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>
Csaba Henk committed
May 27, 2011 at 16:13 UTC
ea69619cd1081359e73e597a76fcf6444f222f2d
1 file changed
+1
-1
git-rebase.sh
+1
-1
@@ -332,7 +332,7 @@ abort)
332
read_basic_state
333
case "$head_name" in
334
refs/*)
335
- git symbolic-ref HEAD $head_name ||
335
+ git symbolic-ref -m "rebase: aborting" HEAD $head_name ||
336
die "Could not move back to $head_name"
337
;;
338
esac