summaryrefslogtreecommitdiff
path: root/git-rebase--interactive.sh
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2011-05-27 16:16:14 -0400
committerJunio C Hamano <gitster@pobox.com>2011-05-27 15:52:03 -0700
commit53f2ffa80c1c5ea5feb9fbe7432bf7106cf3047e (patch)
tree3e5d5c5dbd67ca9d55c8da29b34438b16766f30b /git-rebase--interactive.sh
parentea69619cd1081359e73e597a76fcf6444f222f2d (diff)
downloadgit-53f2ffa80c1c5ea5feb9fbe7432bf7106cf3047e.tar.gz
rebase: write a reflog entry when finishing
When we finish a rebase, our detached HEAD is at the final result. We update the original branch ref with this result, and then point the HEAD symbolic ref at the updated branch. We write a reflog for the branch update, but not for the update of HEAD. Because we're already at the final result on the detached HEAD, moving to the branch actually doesn't change our commit sha1 at all. So in that sense, a reflog entry would be pointless. However, humans do read reflogs, and an entry saying "rebase finished: returning to refs/heads/master" can be helpful in understanding what is going on. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'git-rebase--interactive.sh')
-rw-r--r--git-rebase--interactive.sh4
1 files changed, 3 insertions, 1 deletions
diff --git a/git-rebase--interactive.sh b/git-rebase--interactive.sh
index 41ba96aeb7..65690af893 100644
--- a/git-rebase--interactive.sh
+++ b/git-rebase--interactive.sh
@@ -510,7 +510,9 @@ do_next () {
refs/*)
message="$GIT_REFLOG_ACTION: $head_name onto $shortonto" &&
git update-ref -m "$message" $head_name $newhead $orig_head &&
- git symbolic-ref HEAD $head_name
+ git symbolic-ref \
+ -m "$GIT_REFLOG_ACTION: returning to $head_name" \
+ HEAD $head_name
;;
esac && {
test ! -f "$state_dir"/verbose ||