Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2020-07-10 00:00:43 +0300
committerJunio C Hamano <gitster@pobox.com>2020-07-10 00:00:43 +0300
commit46be023084bd6ce4958f16427da7cdaf91cff205 (patch)
tree2986f28c116c2a6eaf96f551968e1a878abfde97 /builtin/diff.c
parent20d451c4dab4e41efb315a4c7f9d1eb2d83c4fc5 (diff)
parent5f46e610cb43496612d7ec030d142b6b8515399d (diff)
Merge branch 'ct/diff-with-merge-base-clarification' into master
Recent update to "git diff" meant as a code clean-up introduced a bug in its error handling code, which has been corrected. * ct/diff-with-merge-base-clarification: diff: check for merge bases before assigning sym->base
Diffstat (limited to 'builtin/diff.c')
-rw-r--r--builtin/diff.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/builtin/diff.c b/builtin/diff.c
index 8c36da09b6..cb98811c21 100644
--- a/builtin/diff.c
+++ b/builtin/diff.c
@@ -355,9 +355,9 @@ static void symdiff_prepare(struct rev_info *rev, struct symdiff *sym)
sym->left = rev->pending.objects[lpos].name;
sym->right = rev->pending.objects[rpos].name;
- sym->base = rev->pending.objects[basepos].name;
if (basecount == 0)
die(_("%s...%s: no merge base"), sym->left, sym->right);
+ sym->base = rev->pending.objects[basepos].name;
bitmap_unset(map, basepos); /* unmark the base we want */
sym->warn = basecount > 1;
sym->skip = map;