зеркало из https://github.com/microsoft/git.git
Merge branch 'kg/external-diff-save-env'
The code to drive GIT_EXTERNAL_DIFF command relied on the string returned from getenv() to be non-volatile, which is not true, that has been corrected. * kg/external-diff-save-env: diff: ensure correct lifetime of external_diff_cmd
This commit is contained in:
Коммит
6a015cecbe
2
diff.c
2
diff.c
|
@ -493,7 +493,7 @@ static const char *external_diff(void)
|
|||
|
||||
if (done_preparing)
|
||||
return external_diff_cmd;
|
||||
external_diff_cmd = getenv("GIT_EXTERNAL_DIFF");
|
||||
external_diff_cmd = xstrdup_or_null(getenv("GIT_EXTERNAL_DIFF"));
|
||||
if (!external_diff_cmd)
|
||||
external_diff_cmd = external_diff_cmd_cfg;
|
||||
done_preparing = 1;
|
||||
|
|
Загрузка…
Ссылка в новой задаче