Skip to content

Commit

Permalink
Merge pull request git-for-windows#2026 from gitster/kg/external-diff…
Browse files Browse the repository at this point in the history
…-save-env

diff: ensure correct lifetime of external_diff_cmd
  • Loading branch information
dscho committed Feb 7, 2019
2 parents 5fb64e5 + 42c6914 commit ed48192
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion diff.c
Original file line number Diff line number Diff line change
Expand Up @@ -489,7 +489,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;
Expand Down

0 comments on commit ed48192

Please sign in to comment.