{"thread":{"id":"41814","subject":"[PATCH] rebase-i: print abbreviated hash when stop for editing","startedAt":"2016-03-24T18:31:21Z","lastAt":"2016-03-28T18:43:12Z","messageCount":5,"participants":["Ralf Thielow","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"281707","messageId":"1458844281-13107-1-git-send-email-ralf.thielow@gmail.com","threadId":"41814","inReplyTo":null,"subject":"[PATCH] rebase-i: print abbreviated hash when stop for editing","fromName":"Ralf Thielow","fromEmail":"ralf.thielow@gmail.com","sentAt":"2016-03-24T18:31:21Z","receivedAt":"2016-03-24T18:31:21Z","isPatch":true,"sender":{"key":"ralf.thielow@gmail.com","avatar":"https://avatars.githubusercontent.com/u/1275832?v=4"},"body":"Signed-off-by: Ralf Thielow <ralf.thielow@gmail.com>\n---\n git-rebase--interactive.sh | 3 ++-\n 1 file changed, 2 insertions(+), 1 deletion(-)\n\ndiff --git a/git-rebase--interactive.sh b/git-rebase--interactive.sh\nindex 4cde685..9ea3075 100644\n--- a/git-rebase--interactive.sh\n+++ b/git-rebase--interactive.sh\n@@ -548,7 +548,8 @@ do_next () {\n \n \t\tmark_action_done\n \t\tdo_pick $sha1 \"$rest\"\n-\t\twarn \"Stopped at $sha1... $rest\"\n+\t\tsha1_abbrev=$(git rev-parse --short $sha1)\n+\t\twarn \"Stopped at $sha1_abbrev... $rest\"\n \t\texit_with_patch $sha1 0\n \t\t;;\n \tsquash|s|fixup|f)\n-- \n2.8.0.rc4.7.g35d7ca9.dirty\n"},{"id":"281715","messageId":"xmqqfuvf8xav.fsf@gitster.mtv.corp.google.com","threadId":"41814","inReplyTo":"1458844281-13107-1-git-send-email-ralf.thielow@gmail.com","subject":"Re: [PATCH] rebase-i: print abbreviated hash when stop for editing","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2016-03-24T19:56:24Z","receivedAt":"2016-03-24T19:56:24Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Ralf Thielow <ralf.thielow@gmail.com> writes:\n\n> Signed-off-by: Ralf Thielow <ralf.thielow@gmail.com>\n> ---\n\nHmph, the reason why this is a good thing to do is because an\noverlong $sha1 would push $rest too far to the right (possibly\nmaking it overflow to the next line)?\n\n\n>  git-rebase--interactive.sh | 3 ++-\n>  1 file changed, 2 insertions(+), 1 deletion(-)\n>\n> diff --git a/git-rebase--interactive.sh b/git-rebase--interactive.sh\n> index 4cde685..9ea3075 100644\n> --- a/git-rebase--interactive.sh\n> +++ b/git-rebase--interactive.sh\n> @@ -548,7 +548,8 @@ do_next () {\n>  \n>  \t\tmark_action_done\n>  \t\tdo_pick $sha1 \"$rest\"\n> -\t\twarn \"Stopped at $sha1... $rest\"\n> +\t\tsha1_abbrev=$(git rev-parse --short $sha1)\n> +\t\twarn \"Stopped at $sha1_abbrev... $rest\"\n>  \t\texit_with_patch $sha1 0\n>  \t\t;;\n>  \tsquash|s|fixup|f)\n"},{"id":"281721","messageId":"CAN0XMOJKq7nvyVu57g=Fi3195oG4pDbL7mw3urL33iJDb4Y0cA@mail.gmail.com","threadId":"41814","inReplyTo":"xmqqfuvf8xav.fsf@gitster.mtv.corp.google.com","subject":"Re: [PATCH] rebase-i: print abbreviated hash when stop for editing","fromName":"Ralf Thielow","fromEmail":"ralf.thielow@gmail.com","sentAt":"2016-03-24T21:06:37Z","receivedAt":"2016-03-24T21:06:37Z","isPatch":true,"sender":{"key":"ralf.thielow@gmail.com","avatar":"https://avatars.githubusercontent.com/u/1275832?v=4"},"body":"2016-03-24 20:56 GMT+01:00 Junio C Hamano <gitster@pobox.com>:\n> Ralf Thielow <ralf.thielow@gmail.com> writes:\n>\n>> Signed-off-by: Ralf Thielow <ralf.thielow@gmail.com>\n>> ---\n>\n> Hmph, the reason why this is a good thing to do is because an\n> overlong $sha1 would push $rest too far to the right (possibly\n> making it overflow to the next line)?\n>\n\nYes.  Another solution would have been to remove the \"...\" at the\nend, but I prefer to see a shorter message rather than having\nthe full sha1 for whatever reason.\n\n>\n>>  git-rebase--interactive.sh | 3 ++-\n>>  1 file changed, 2 insertions(+), 1 deletion(-)\n>>\n>> diff --git a/git-rebase--interactive.sh b/git-rebase--interactive.sh\n>> index 4cde685..9ea3075 100644\n>> --- a/git-rebase--interactive.sh\n>> +++ b/git-rebase--interactive.sh\n>> @@ -548,7 +548,8 @@ do_next () {\n>>\n>>               mark_action_done\n>>               do_pick $sha1 \"$rest\"\n>> -             warn \"Stopped at $sha1... $rest\"\n>> +             sha1_abbrev=$(git rev-parse --short $sha1)\n>> +             warn \"Stopped at $sha1_abbrev... $rest\"\n>>               exit_with_patch $sha1 0\n>>               ;;\n>>       squash|s|fixup|f)\n"},{"id":"281968","messageId":"1459180800-5744-1-git-send-email-ralf.thielow@gmail.com","threadId":"41814","inReplyTo":"1458844281-13107-1-git-send-email-ralf.thielow@gmail.com","subject":"[PATCH v2] rebase-i: print an abbreviated hash when stop for editing","fromName":"Ralf Thielow","fromEmail":"ralf.thielow@gmail.com","sentAt":"2016-03-28T16:00:00Z","receivedAt":"2016-03-28T16:00:00Z","isPatch":true,"sender":{"key":"ralf.thielow@gmail.com","avatar":"https://avatars.githubusercontent.com/u/1275832?v=4"},"body":"The message that is shown when rebase-i stops for editing prints\nthe full hash of the commit where it stopped which makes the message\noverflow to the next line on smaller terminal windows.  Print an\nabbreviated hash instead.\n\nSigned-off-by: Ralf Thielow <ralf.thielow@gmail.com>\n---\n git-rebase--interactive.sh | 3 ++-\n 1 file changed, 2 insertions(+), 1 deletion(-)\n\ndiff --git a/git-rebase--interactive.sh b/git-rebase--interactive.sh\nindex 4cde685..9ea3075 100644\n--- a/git-rebase--interactive.sh\n+++ b/git-rebase--interactive.sh\n@@ -548,7 +548,8 @@ do_next () {\n \n \t\tmark_action_done\n \t\tdo_pick $sha1 \"$rest\"\n-\t\twarn \"Stopped at $sha1... $rest\"\n+\t\tsha1_abbrev=$(git rev-parse --short $sha1)\n+\t\twarn \"Stopped at $sha1_abbrev... $rest\"\n \t\texit_with_patch $sha1 0\n \t\t;;\n \tsquash|s|fixup|f)\n-- \n2.8.0.rc4.285.gc3ac548\n"},{"id":"281978","messageId":"xmqqshzaxx33.fsf@gitster.mtv.corp.google.com","threadId":"41814","inReplyTo":"1459180800-5744-1-git-send-email-ralf.thielow@gmail.com","subject":"Re: [PATCH v2] rebase-i: print an abbreviated hash when stop for editing","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2016-03-28T18:43:12Z","receivedAt":"2016-03-28T18:43:12Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Ralf Thielow <ralf.thielow@gmail.com> writes:\n\n> The message that is shown when rebase-i stops for editing prints\n> the full hash of the commit where it stopped which makes the message\n> overflow to the next line on smaller terminal windows.  Print an\n> abbreviated hash instead.\n>\n> Signed-off-by: Ralf Thielow <ralf.thielow@gmail.com>\n> ---\n\nThanks, will queue.\n\n>  git-rebase--interactive.sh | 3 ++-\n>  1 file changed, 2 insertions(+), 1 deletion(-)\n>\n> diff --git a/git-rebase--interactive.sh b/git-rebase--interactive.sh\n> index 4cde685..9ea3075 100644\n> --- a/git-rebase--interactive.sh\n> +++ b/git-rebase--interactive.sh\n> @@ -548,7 +548,8 @@ do_next () {\n>  \n>  \t\tmark_action_done\n>  \t\tdo_pick $sha1 \"$rest\"\n> -\t\twarn \"Stopped at $sha1... $rest\"\n> +\t\tsha1_abbrev=$(git rev-parse --short $sha1)\n> +\t\twarn \"Stopped at $sha1_abbrev... $rest\"\n>  \t\texit_with_patch $sha1 0\n>  \t\t;;\n>  \tsquash|s|fixup|f)\n"}]}