summaryrefslogtreecommitdiff
path: root/pack-objects.h
diff options
context:
space:
mode:
authorLibravatar Elijah Newren <newren@gmail.com>2019-08-15 14:40:31 -0700
committerLibravatar Junio C Hamano <gitster@pobox.com>2019-08-16 12:47:20 -0700
commit65c01c644250fb0a92f929c2fc61f33771bf480f (patch)
treef0cd0dbe3cf0b39f52a836390a36f1d8aff294c6 /pack-objects.h
parentmerge-recursive: be consistent with assert (diff)
downloadtgif-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