Merge branch 'munmap-before-ext-diff'

This topic branch fixes the usage pattern where files are still held
open with an exclusive lock when an external program is asked to open
those very same files.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
This commit is contained in:
Johannes Schindelin 2019-05-13 20:38:07 +02:00
Родитель db1127734c 725d24cdfc
Коммит aff5618b9f
1 изменённых файлов: 4 добавлений и 0 удалений

4
diff.c
Просмотреть файл

@ -4190,6 +4190,10 @@ static void run_external_diff(const char *pgm,
argv_array_pushf(&env, "GIT_DIFF_PATH_COUNTER=%d", ++o->diff_path_counter);
argv_array_pushf(&env, "GIT_DIFF_PATH_TOTAL=%d", q->nr);
if (one && one->should_munmap)
diff_free_filespec_data(one);
if (two && two->should_munmap)
diff_free_filespec_data(two);
if (run_command_v_opt_cd_env(argv.argv, RUN_USING_SHELL, NULL, env.argv))
die(_("external diff died, stopping at %s"), name);