summaryrefslogtreecommitdiff
path: root/git-rebase.sh
diff options
context:
space:
mode:
authorCsaba Henk <csaba@lowlife.hu>2011-05-27 20:13:02 (GMT)
committerJunio C Hamano <gitster@pobox.com>2011-05-27 22:52:01 (GMT)
commitea69619cd1081359e73e597a76fcf6444f222f2d (patch)
tree4b8aa608078c738e3b2f2c2158e3251dc82d921a /git-rebase.sh
parenta9930e359c45302f92639e8cd0a61c9c912e0b22 (diff)
downloadgit-ea69619cd1081359e73e597a76fcf6444f222f2d.zip
git-ea69619cd1081359e73e597a76fcf6444f222f2d.tar.gz
git-ea69619cd1081359e73e597a76fcf6444f222f2d.tar.bz2
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>
Diffstat (limited to 'git-rebase.sh')
-rwxr-xr-xgit-rebase.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/git-rebase.sh b/git-rebase.sh
index 7a54bfc..57cbe49 100755
--- a/git-rebase.sh
+++ b/git-rebase.sh
@@ -332,7 +332,7 @@ abort)
read_basic_state
case "$head_name" in
refs/*)
- git symbolic-ref HEAD $head_name ||
+ git symbolic-ref -m "rebase: aborting" HEAD $head_name ||
die "Could not move back to $head_name"
;;
esac