Skip to content

Commit

Permalink
Merge pull request #2026 from gitster/kg/external-diff-save-env
Browse files Browse the repository at this point in the history
diff: ensure correct lifetime of external_diff_cmd
  • Loading branch information
dscho authored Jan 16, 2019
2 parents 6b28658 + 6776a84 commit 4d3be1d
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 4d3be1d

Please sign in to comment.