diff options
author | Michael J Gruber <git@drmicha.warpmail.net> | 2012-08-10 08:51:19 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2012-08-10 09:41:28 -0700 |
commit | 1af221ef5cb84c792303a0d16ca91197e2b70279 (patch) | |
tree | 9440e85ea51e47f09073643c9e8dea6e700db8c3 | |
parent | Git 1.7.10.5 (diff) | |
download | tgif-1af221ef5cb84c792303a0d16ca91197e2b70279.tar.xz |
rebase -i: use full onto sha1 in reflog
'git rebase' uses the full onto sha1 for the reflog message whereas 'git
rebase -i' uses the short sha1. This is not only inconsistent, but can
lead to problems when the reflog is inspected at a later time at which
that abbreviation may have become ambiguous.
Make 'rebase -i' use the full onto sha1, as well.
Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
-rw-r--r-- | git-rebase--interactive.sh | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/git-rebase--interactive.sh b/git-rebase--interactive.sh index 2e1325824c..905346084c 100644 --- a/git-rebase--interactive.sh +++ b/git-rebase--interactive.sh @@ -533,11 +533,10 @@ do_next () { test -s "$todo" && return comment_for_reflog finish && - shortonto=$(git rev-parse --short $onto) && newhead=$(git rev-parse HEAD) && case $head_name in refs/*) - message="$GIT_REFLOG_ACTION: $head_name onto $shortonto" && + message="$GIT_REFLOG_ACTION: $head_name onto $onto" && git update-ref -m "$message" $head_name $newhead $orig_head && git symbolic-ref \ -m "$GIT_REFLOG_ACTION: returning to $head_name" \ |