diff options
| author | Junio C Hamano <gitster@pobox.com> | 2024-02-06 14:31:20 -0800 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2024-02-06 14:31:21 -0800 |
| commit | 92e69dfb66fa5c760e2d1f76c8a21cdb6faacaee (patch) | |
| tree | b61fcfdac9f500306608721c8958bda767b6d281 /diff.c | |
| parent | Merge branch 'kh/maintenance-use-xdg-when-it-should' (diff) | |
| parent | diff: handle NULL meta-info when spawning external diff (diff) | |
| download | git-92e69dfb66fa5c760e2d1f76c8a21cdb6faacaee.tar.gz git-92e69dfb66fa5c760e2d1f76c8a21cdb6faacaee.zip | |
Merge branch 'jk/diff-external-with-no-index'
"git diff --no-index file1 file2" segfaulted while invoking the
external diff driver, which has been corrected.
* jk/diff-external-with-no-index:
diff: handle NULL meta-info when spawning external diff
Diffstat (limited to 'diff.c')
| -rw-r--r-- | diff.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -4384,7 +4384,8 @@ static void run_external_diff(const char *pgm, add_external_diff_name(o->repo, &cmd.args, two); if (other) { strvec_push(&cmd.args, other); - strvec_push(&cmd.args, xfrm_msg); + if (xfrm_msg) + strvec_push(&cmd.args, xfrm_msg); } } |
