{"thread":{"id":"31218","subject":"[RFC/PATCH] rebase -i: use full onto sha1 in reflog","startedAt":"2012-08-09T16:05:59Z","lastAt":"2012-08-10T06:51:19Z","messageCount":5,"participants":["Michael J Gruber","Martin von Zweigbergk","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"196737","messageId":"89f79049a5fd737716ad51630a8c1ee4a27d747e.1344528082.git.git@drmicha.warpmail.net","threadId":"31218","inReplyTo":null,"subject":"[RFC/PATCH] rebase -i: use full onto sha1 in reflog","fromName":"Michael J Gruber","fromEmail":"git@drmicha.warpmail.net","sentAt":"2012-08-09T16:05:59Z","receivedAt":"2012-08-09T16:05:59Z","isPatch":true,"sender":{"key":"git@grubix.eu","avatar":"https://avatars.githubusercontent.com/u/233215?v=4"},"body":"'git rebase' uses the full onto sha1 for the reflog message whereas 'git\nrebase -i' uses the short sha1. This is not only inconsistent, but can\nlead to problems when the reflog is inspected at a later time at which\nthat abbreviation may have become ambiguous.\n\nMake 'rebase -i' use the full onto sha1, as well.\n\nSigned-off-by: Michael J Gruber <git@drmicha.warpmail.net>\n---\nI don't remember having sent this out before but have been running with\nit since (including tests). I don't see it on the list either.\n\nWhile not for 1.7.12 obviously, it might still be good to have.\n\n git-rebase--interactive.sh | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/git-rebase--interactive.sh b/git-rebase--interactive.sh\nindex 0d2056f..dbc9de6 100644\n--- a/git-rebase--interactive.sh\n+++ b/git-rebase--interactive.sh\n@@ -573,7 +573,7 @@ do_next () {\n \tnewhead=$(git rev-parse HEAD) &&\n \tcase $head_name in\n \trefs/*)\n-\t\tmessage=\"$GIT_REFLOG_ACTION: $head_name onto $shortonto\" &&\n+\t\tmessage=\"$GIT_REFLOG_ACTION: $head_name onto $onto\" &&\n \t\tgit update-ref -m \"$message\" $head_name $newhead $orig_head &&\n \t\tgit symbolic-ref \\\n \t\t  -m \"$GIT_REFLOG_ACTION: returning to $head_name\" \\\n-- \n1.7.12.rc2.245.g4f94e02\n"},{"id":"196742","messageId":"CAOeW2eESQyT0xzy8KjAdhgr45MGosY86cQOy2VsN6TtJqeEYjA@mail.gmail.com","threadId":"31218","inReplyTo":"89f79049a5fd737716ad51630a8c1ee4a27d747e.1344528082.git.git@drmicha.warpmail.net","subject":"Re: [RFC/PATCH] rebase -i: use full onto sha1 in reflog","fromName":"Martin von Zweigbergk","fromEmail":"martin.von.zweigbergk@gmail.com","sentAt":"2012-08-09T17:04:07Z","receivedAt":"2012-08-09T17:04:07Z","isPatch":true,"sender":{"key":"martinvonz@gmail.com","avatar":"https://avatars.githubusercontent.com/u/891642?v=4"},"body":"On Thu, Aug 9, 2012 at 9:05 AM, Michael J Gruber\n<git@drmicha.warpmail.net> wrote:\n> diff --git a/git-rebase--interactive.sh b/git-rebase--interactive.sh\n> index 0d2056f..dbc9de6 100644\n> --- a/git-rebase--interactive.sh\n> +++ b/git-rebase--interactive.sh\n> @@ -573,7 +573,7 @@ do_next () {\n>         newhead=$(git rev-parse HEAD) &&\n>         case $head_name in\n>         refs/*)\n> -               message=\"$GIT_REFLOG_ACTION: $head_name onto $shortonto\" &&\n> +               message=\"$GIT_REFLOG_ACTION: $head_name onto $onto\" &&\n\nAfter this patch, is there any point in the\n\n shortonto=$(git rev-parse --short $onto) &&\n\nline just before the context? (I can't see any.)\n"},{"id":"196743","messageId":"7va9y4ouvx.fsf@alter.siamese.dyndns.org","threadId":"31218","inReplyTo":"89f79049a5fd737716ad51630a8c1ee4a27d747e.1344528082.git.git@drmicha.warpmail.net","subject":"Re: [RFC/PATCH] rebase -i: use full onto sha1 in reflog","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2012-08-09T17:08:50Z","receivedAt":"2012-08-09T17:08:50Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Michael J Gruber <git@drmicha.warpmail.net> writes:\n\n> 'git rebase' uses the full onto sha1 for the reflog message whereas 'git\n> rebase -i' uses the short sha1. This is not only inconsistent, but can\n> lead to problems when the reflog is inspected at a later time at which\n> that abbreviation may have become ambiguous.\n>\n> Make 'rebase -i' use the full onto sha1, as well.\n>\n> Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>\n> ---\n> I don't remember having sent this out before but have been running with\n> it since (including tests). I don't see it on the list either.\n>\n> While not for 1.7.12 obviously, it might still be good to have.\n\nMakes sense, I agree it is not that urgent to include it in 1.7.12,\nand I think it is not just \"good to have\" but \"we should have done\nso from day one and it cannot break anybody who is reading the\nreflog\".\n\nThanks.\n\n>\n>  git-rebase--interactive.sh | 2 +-\n>  1 file changed, 1 insertion(+), 1 deletion(-)\n>\n> diff --git a/git-rebase--interactive.sh b/git-rebase--interactive.sh\n> index 0d2056f..dbc9de6 100644\n> --- a/git-rebase--interactive.sh\n> +++ b/git-rebase--interactive.sh\n> @@ -573,7 +573,7 @@ do_next () {\n>  \tnewhead=$(git rev-parse HEAD) &&\n>  \tcase $head_name in\n>  \trefs/*)\n> -\t\tmessage=\"$GIT_REFLOG_ACTION: $head_name onto $shortonto\" &&\n> +\t\tmessage=\"$GIT_REFLOG_ACTION: $head_name onto $onto\" &&\n>  \t\tgit update-ref -m \"$message\" $head_name $newhead $orig_head &&\n>  \t\tgit symbolic-ref \\\n>  \t\t  -m \"$GIT_REFLOG_ACTION: returning to $head_name\" \\\n"},{"id":"196747","messageId":"7vwr18nehe.fsf@alter.siamese.dyndns.org","threadId":"31218","inReplyTo":"CAOeW2eESQyT0xzy8KjAdhgr45MGosY86cQOy2VsN6TtJqeEYjA@mail.gmail.com","subject":"Re: [RFC/PATCH] rebase -i: use full onto sha1 in reflog","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2012-08-09T17:48:29Z","receivedAt":"2012-08-09T17:48:29Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Martin von Zweigbergk <martin.von.zweigbergk@gmail.com> writes:\n\n> On Thu, Aug 9, 2012 at 9:05 AM, Michael J Gruber\n> <git@drmicha.warpmail.net> wrote:\n>> diff --git a/git-rebase--interactive.sh b/git-rebase--interactive.sh\n>> index 0d2056f..dbc9de6 100644\n>> --- a/git-rebase--interactive.sh\n>> +++ b/git-rebase--interactive.sh\n>> @@ -573,7 +573,7 @@ do_next () {\n>>         newhead=$(git rev-parse HEAD) &&\n>>         case $head_name in\n>>         refs/*)\n>> -               message=\"$GIT_REFLOG_ACTION: $head_name onto $shortonto\" &&\n>> +               message=\"$GIT_REFLOG_ACTION: $head_name onto $onto\" &&\n>\n> After this patch, is there any point in the\n>\n>  shortonto=$(git rev-parse --short $onto) &&\n>\n> line just before the context? (I can't see any.)\n\nGood point; the function always exits after reaching this point, so\nit should be safe to omit it.\n"},{"id":"196776","messageId":"54180665e1207275db9694cd68f49ff96812284e.1344581316.git.git@drmicha.warpmail.net","threadId":"31218","inReplyTo":"7vwr18nehe.fsf@alter.siamese.dyndns.org","subject":"[PATCHv2] rebase -i: use full onto sha1 in reflog","fromName":"Michael J Gruber","fromEmail":"git@drmicha.warpmail.net","sentAt":"2012-08-10T06:51:19Z","receivedAt":"2012-08-10T06:51:19Z","isPatch":false,"sender":{"key":"git@grubix.eu","avatar":"https://avatars.githubusercontent.com/u/233215?v=4"},"body":"'git rebase' uses the full onto sha1 for the reflog message whereas 'git\nrebase -i' uses the short sha1. This is not only inconsistent, but can\nlead to problems when the reflog is inspected at a later time at which\nthat abbreviation may have become ambiguous.\n\nMake 'rebase -i' use the full onto sha1, as well.\n\nSigned-off-by: Michael J Gruber <git@drmicha.warpmail.net>\n---\nSo, this is without the now superfluous shortonto definition.\n\nThe other place where shortonto is defined is still needed.\n\n git-rebase--interactive.sh | 3 +--\n 1 file changed, 1 insertion(+), 2 deletions(-)\n\ndiff --git a/git-rebase--interactive.sh b/git-rebase--interactive.sh\nindex 0d2056f..a09e842 100644\n--- a/git-rebase--interactive.sh\n+++ b/git-rebase--interactive.sh\n@@ -569,11 +569,10 @@ do_next () {\n \ttest -s \"$todo\" && return\n \n \tcomment_for_reflog finish &&\n-\tshortonto=$(git rev-parse --short $onto) &&\n \tnewhead=$(git rev-parse HEAD) &&\n \tcase $head_name in\n \trefs/*)\n-\t\tmessage=\"$GIT_REFLOG_ACTION: $head_name onto $shortonto\" &&\n+\t\tmessage=\"$GIT_REFLOG_ACTION: $head_name onto $onto\" &&\n \t\tgit update-ref -m \"$message\" $head_name $newhead $orig_head &&\n \t\tgit symbolic-ref \\\n \t\t  -m \"$GIT_REFLOG_ACTION: returning to $head_name\" \\\n-- \n1.7.12.rc2.245.g4f94e02\n"}]}