Thread (1 message) 1 message, 1 author, 2016-06-15

Re: [RFC/PATCH] rebase -i: use full onto sha1 in reflog

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:54:27

Michael J Gruber [off-list ref] writes:
'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 <redacted>
---
I don't remember having sent this out before but have been running with
it since (including tests). I don't see it on the list either.

While not for 1.7.12 obviously, it might still be good to have.
Makes sense, I agree it is not that urgent to include it in 1.7.12,
and I think it is not just "good to have" but "we should have done
so from day one and it cannot break anybody who is reading the
reflog".

Thanks.
quoted hunk
 git-rebase--interactive.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/git-rebase--interactive.sh b/git-rebase--interactive.sh
index 0d2056f..dbc9de6 100644
--- a/git-rebase--interactive.sh
+++ b/git-rebase--interactive.sh
@@ -573,7 +573,7 @@ do_next () {
 	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" \
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help