rebase: create HEAD reflog entry when aborting
When we abort a rebase, we return to the original value of HEAD. Failing to write a reflog entry means we create a gap in the reflog (which can cause "git show HEAD@{5.minutes.ago}" to issue a warning). Plus having the extra entry makes the reflog easier to follow for a human. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:

committed by
Junio C Hamano

parent
a9930e359c
commit
ea69619cd1
@ -332,7 +332,7 @@ abort)
|
|||||||
read_basic_state
|
read_basic_state
|
||||||
case "$head_name" in
|
case "$head_name" in
|
||||||
refs/*)
|
refs/*)
|
||||||
git symbolic-ref HEAD $head_name ||
|
git symbolic-ref -m "rebase: aborting" HEAD $head_name ||
|
||||||
die "Could not move back to $head_name"
|
die "Could not move back to $head_name"
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
Reference in New Issue
Block a user