diff options
author | Elijah Newren <newren@gmail.com> | 2019-08-15 14:40:31 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2019-08-16 12:47:20 -0700 |
commit | 65c01c644250fb0a92f929c2fc61f33771bf480f (patch) | |
tree | f0cd0dbe3cf0b39f52a836390a36f1d8aff294c6 /pack-objects.h | |
parent | merge-recursive: be consistent with assert (diff) | |
download | tgif-65c01c644250fb0a92f929c2fc61f33771bf480f.tar.xz |
checkout: provide better conflict hunk description with detached HEAD
When running 'git checkout -m' and using diff3 style conflict markers,
we want all the conflict hunks (left-side, "common" or "merge base", and
right-side) to have label markers letting the user know where each came
from. The "common" hunk label (o.ancestor) came from
old_branch_info->name, but that is NULL when HEAD is detached, which
resulted in a blank label. Check for that case and provide an
abbreviated commit hash instead.
(Incidentally, this was the only case in the git codebase where
merge_trees() was called with opt->ancestor being NULL. A subsequent
commit will prevent similar problems by enforcing that merge_trees()
always be called with opt->ancestor != NULL.)
Signed-off-by: Elijah Newren <newren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'pack-objects.h')
0 files changed, 0 insertions, 0 deletions