{"thread":{"id":"45783","subject":"[PATCH] rebase -i: add config to abbreviate command name","startedAt":"2017-04-24T03:24:44Z","lastAt":"2017-04-27T01:21:20Z","messageCount":28,"participants":["Liam Beguin","Johannes Schindelin","liam BEGUIN","Jeff King","Junio C Hamano","Jacob Keller","Andreas Schwab","Philip Oakley","Mike Rappazzo","liam Beguin","Ævar Arnfjörð Bjarmason"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"317636","messageId":"20170424032347.10878-1-liambeguin@gmail.com","threadId":"45783","inReplyTo":null,"subject":"[PATCH] rebase -i: add config to abbreviate command name","fromName":"Liam Beguin","fromEmail":"liambeguin@gmail.com","sentAt":"2017-04-24T03:23:47Z","receivedAt":"2017-04-24T03:24:44Z","isPatch":true,"sender":{"key":"liambeguin@gmail.com","avatar":"https://avatars.githubusercontent.com/u/3811160?v=4"},"body":"Add the 'rebase.abbrevCmd' boolean config option to allow\nthe user to abbreviate the default command name while editing\nthe 'git-rebase-todo' file.\n\nSigned-off-by: Liam Beguin <liambeguin@gmail.com>\n---\nNotes:\n\n *  This allows the lines to remain aligned when using single\n    letter commands.\n\n Documentation/config.txt     | 3 +++\n Documentation/git-rebase.txt | 3 +++\n git-rebase--interactive.sh   | 8 ++++++--\n 3 files changed, 12 insertions(+), 2 deletions(-)\n\ndiff --git a/Documentation/config.txt b/Documentation/config.txt\nindex 475e874d5155..59b64832aeb4 100644\n--- a/Documentation/config.txt\n+++ b/Documentation/config.txt\n@@ -2614,6 +2614,9 @@ rebase.instructionFormat::\n \tthe instruction list during an interactive rebase.  The format will automatically\n \thave the long commit hash prepended to the format.\n \n+rebase.abbrevCmd::\n+\tIf set to true, abbreviate command name in interactive mode.\n+\n receive.advertiseAtomic::\n \tBy default, git-receive-pack will advertise the atomic push\n \tcapability to its clients. If you don't want to advertise this\ndiff --git a/Documentation/git-rebase.txt b/Documentation/git-rebase.txt\nindex 67d48e688315..0c423d903625 100644\n--- a/Documentation/git-rebase.txt\n+++ b/Documentation/git-rebase.txt\n@@ -222,6 +222,9 @@ rebase.missingCommitsCheck::\n rebase.instructionFormat::\n \tCustom commit list format to use during an `--interactive` rebase.\n \n+rebase.abbrevCmd::\n+\tIf set to true, abbreviate command name in interactive mode.\n+\n OPTIONS\n -------\n --onto <newbase>::\ndiff --git a/git-rebase--interactive.sh b/git-rebase--interactive.sh\nindex 2c9c0165b5ab..9f3e82b79615 100644\n--- a/git-rebase--interactive.sh\n+++ b/git-rebase--interactive.sh\n@@ -1210,6 +1210,10 @@ else\n \trevisions=$onto...$orig_head\n \tshortrevisions=$shorthead\n fi\n+\n+rebasecmd=pick\n+test \"$(git config --bool --get rebase.abbrevCmd)\" = true && rebasecmd=p\n+\n format=$(git config --get rebase.instructionFormat)\n # the 'rev-list .. | sed' requires %m to parse; the instruction requires %H to parse\n git rev-list $merges_option --format=\"%m%H ${format:-%s}\" \\\n@@ -1228,7 +1232,7 @@ do\n \n \tif test t != \"$preserve_merges\"\n \tthen\n-\t\tprintf '%s\\n' \"${comment_out}pick $sha1 $rest\" >>\"$todo\"\n+\t\tprintf '%s\\n' \"${comment_out}${rebasecmd} $sha1 $rest\" >>\"$todo\"\n \telse\n \t\tif test -z \"$rebase_root\"\n \t\tthen\n@@ -1246,7 +1250,7 @@ do\n \t\tif test f = \"$preserve\"\n \t\tthen\n \t\t\ttouch \"$rewritten\"/$sha1\n-\t\t\tprintf '%s\\n' \"${comment_out}pick $sha1 $rest\" >>\"$todo\"\n+\t\t\tprintf '%s\\n' \"${comment_out}${rebasecmd} $sha1 $rest\" >>\"$todo\"\n \t\tfi\n \tfi\n done\n-- \n2.9.3\n\n"},{"id":"317662","messageId":"alpine.DEB.2.20.1704241225300.3480@virtualbox","threadId":"45783","inReplyTo":"20170424032347.10878-1-liambeguin@gmail.com","subject":"Re: [PATCH] rebase -i: add config to abbreviate command name","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2017-04-24T10:26:12Z","receivedAt":"2017-04-24T10:26:26Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi Liam,\n\nOn Sun, 23 Apr 2017, Liam Beguin wrote:\n\n> Add the 'rebase.abbrevCmd' boolean config option to allow\n> the user to abbreviate the default command name while editing\n> the 'git-rebase-todo' file.\n\nThis patch does not handle the `git rebase --edit-todo` subcommand.\nIntentional?\n\nCiao,\nJohannes\n"},{"id":"317665","messageId":"1493031889.29673.19.camel@gmail.com","threadId":"45783","inReplyTo":"alpine.DEB.2.20.1704241225300.3480@virtualbox","subject":"Re: [PATCH] rebase -i: add config to abbreviate command name","fromName":"liam BEGUIN","fromEmail":"liambeguin@gmail.com","sentAt":"2017-04-24T11:04:49Z","receivedAt":"2017-04-24T11:06:12Z","isPatch":true,"sender":{"key":"liambeguin@gmail.com","avatar":"https://avatars.githubusercontent.com/u/3811160?v=4"},"body":"Hi, \n\nOn Mon, 2017-04-24 at 12:26 +0200, Johannes Schindelin wrote:\n> Hi Liam,\n> \n> On Sun, 23 Apr 2017, Liam Beguin wrote:\n> \n> > Add the 'rebase.abbrevCmd' boolean config option to allow\n> > the user to abbreviate the default command name while editing\n> > the 'git-rebase-todo' file.\n> \n> This patch does not handle the `git rebase --edit-todo` subcommand.\n> Intentional?\n\nno, this is not intentional, I'll make the changes.\n \n> \n> Ciao,\n> Johannes\n\nThanks, \nLiam\n"},{"id":"317675","messageId":"20170424122911.5mvftamplokwctbr@sigill.intra.peff.net","threadId":"45783","inReplyTo":"20170424032347.10878-1-liambeguin@gmail.com","subject":"Re: [PATCH] rebase -i: add config to abbreviate command name","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2017-04-24T12:29:11Z","receivedAt":"2017-04-24T12:29:20Z","isPatch":true,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Sun, Apr 23, 2017 at 11:23:47PM -0400, Liam Beguin wrote:\n\n> Add the 'rebase.abbrevCmd' boolean config option to allow\n> the user to abbreviate the default command name while editing\n> the 'git-rebase-todo' file.\n\nJust reading this, I was confused about what the patch actually did.\nReading the code, I figured it out, but perhaps an example would make\nsense. Like:\n\n  This means that we will print:\n\n    p 1234abcd subject line\n\n  in the todo file rather than:\n\n    pick 1234abcd subject line\n\nAnd then of course that left me wondering why somebody would want to do\nthat. I understand wanting to _type_ the abbreviated version, but surely\nit's not too much work to read the full word?\n\nThen I saw:\n\n> ---\n> Notes:\n> \n>  *  This allows the lines to remain aligned when using single\n>     letter commands.\n\nThat makes some sense. it should probably be part of the commit message,\nso that future readers of \"git log\" understand why the change was made.\n\n> diff --git a/Documentation/config.txt b/Documentation/config.txt\n> index 475e874d5155..59b64832aeb4 100644\n> --- a/Documentation/config.txt\n> +++ b/Documentation/config.txt\n> @@ -2614,6 +2614,9 @@ rebase.instructionFormat::\n>  \tthe instruction list during an interactive rebase.  The format will automatically\n>  \thave the long commit hash prepended to the format.\n>  \n> +rebase.abbrevCmd::\n> +\tIf set to true, abbreviate command name in interactive mode.\n\nSimilar to the commit message, this might need to go into more detail.\nIt was not immediately obvious to me that \"command name\" means the\ncommand-names in the instruction list.\n\n-Peff\n"},{"id":"317762","messageId":"1493089056.29673.21.camel@gmail.com","threadId":"45783","inReplyTo":"alpine.DEB.2.20.1704241225300.3480@virtualbox","subject":"Re: [PATCH] rebase -i: add config to abbreviate command name","fromName":"liam BEGUIN","fromEmail":"liambeguin@gmail.com","sentAt":"2017-04-25T02:57:36Z","receivedAt":"2017-04-25T02:57:51Z","isPatch":true,"sender":{"key":"liambeguin@gmail.com","avatar":"https://avatars.githubusercontent.com/u/3811160?v=4"},"body":"Hi Johannes,\n\nOn Mon, 2017-04-24 at 12:26 +0200, Johannes Schindelin wrote:\n> Hi Liam,\n> \n> On Sun, 23 Apr 2017, Liam Beguin wrote:\n> \n> > Add the 'rebase.abbrevCmd' boolean config option to allow\n> > the user to abbreviate the default command name while editing\n> > the 'git-rebase-todo' file.\n> \n> This patch does not handle the `git rebase --edit-todo` subcommand.\n> Intentional?\n\nAfter a little more investigation, I'm not sure what should be added for\nthe `git rebase --edit-todo` subcommand. It seems like it uses the same \ntext that was added the first time (with `git rebase -i`). \nDo you have a bit more information about what you meant? \nI don't use this subcommand very often, I'm most likely missing something.\n\n> \n> Ciao,\n> Johannes\n\nThanks, \nLiam \n"},{"id":"317771","messageId":"20170425043742.15529-1-liambeguin@gmail.com","threadId":"45783","inReplyTo":"20170424032347.10878-1-liambeguin@gmail.com","subject":"[PATCH v2] rebase -i: add config to abbreviate command-names","fromName":"Liam Beguin","fromEmail":"liambeguin@gmail.com","sentAt":"2017-04-25T04:37:42Z","receivedAt":"2017-04-25T04:43:51Z","isPatch":true,"sender":{"key":"liambeguin@gmail.com","avatar":"https://avatars.githubusercontent.com/u/3811160?v=4"},"body":"Add the 'rebase.abbrevCmd' boolean config option to allow `git rebase -i`\nto abbreviate the command-names in the instruction list.\n\nThis means that `git rebase -i` would print:\n    p deadbee The oneline of this commit\n    ...\n\ninstead of:\n    pick deadbee The oneline of this commit\n    ...\n\nUsing a single character command-name allows the lines to remain\naligned, making the whole set more readable.\n\nSigned-off-by: Liam Beguin <liambeguin@gmail.com>\n---\nChanges since v1:\n - Improve Documentation and commit message\n\n Documentation/config.txt     | 19 +++++++++++++++++++\n Documentation/git-rebase.txt | 19 +++++++++++++++++++\n git-rebase--interactive.sh   |  8 ++++++--\n 3 files changed, 44 insertions(+), 2 deletions(-)\n\ndiff --git a/Documentation/config.txt b/Documentation/config.txt\nindex 475e874d5155..8b1877f2df91 100644\n--- a/Documentation/config.txt\n+++ b/Documentation/config.txt\n@@ -2614,6 +2614,25 @@ rebase.instructionFormat::\n \tthe instruction list during an interactive rebase.  The format will automatically\n \thave the long commit hash prepended to the format.\n \n+rebase.abbrevCmd::\n+\tIf set to true, `git rebase -i` will abbreviate the command-names in the\n+\tinstruction list. This means that instead of looking like this,\n+\n+-------------------------------------------\n+\tpick deadbee The oneline of this commit\n+\tpick fa1afe1 The oneline of the next commit\n+\t...\n+-------------------------------------------\n+\n+\tthe list would use the short version of the command resulting in\n+\tsomething like this.\n+\n+-------------------------------------------\n+\tp deadbee The oneline of this commit\n+\tp fa1afe1 The oneline of the next commit\n+\t...\n+-------------------------------------------\n+\n receive.advertiseAtomic::\n \tBy default, git-receive-pack will advertise the atomic push\n \tcapability to its clients. If you don't want to advertise this\ndiff --git a/Documentation/git-rebase.txt b/Documentation/git-rebase.txt\nindex 67d48e688315..7d97c0483241 100644\n--- a/Documentation/git-rebase.txt\n+++ b/Documentation/git-rebase.txt\n@@ -222,6 +222,25 @@ rebase.missingCommitsCheck::\n rebase.instructionFormat::\n \tCustom commit list format to use during an `--interactive` rebase.\n \n+rebase.abbrevCmd::\n+\tIf set to true, `git rebase -i` will abbreviate the command-names in the\n+\tinstruction list. This means that instead of looking like this,\n+\n+-------------------------------------------\n+\tpick deadbee The oneline of this commit\n+\tpick fa1afe1 The oneline of the next commit\n+\t...\n+-------------------------------------------\n+\n+\tthe list would use the short version of the command resulting in\n+\tsomething like this.\n+\n+-------------------------------------------\n+\tp deadbee The oneline of this commit\n+\tp fa1afe1 The oneline of the next commit\n+\t...\n+-------------------------------------------\n+\n OPTIONS\n -------\n --onto <newbase>::\ndiff --git a/git-rebase--interactive.sh b/git-rebase--interactive.sh\nindex 2c9c0165b5ab..9f3e82b79615 100644\n--- a/git-rebase--interactive.sh\n+++ b/git-rebase--interactive.sh\n@@ -1210,6 +1210,10 @@ else\n \trevisions=$onto...$orig_head\n \tshortrevisions=$shorthead\n fi\n+\n+rebasecmd=pick\n+test \"$(git config --bool --get rebase.abbrevCmd)\" = true && rebasecmd=p\n+\n format=$(git config --get rebase.instructionFormat)\n # the 'rev-list .. | sed' requires %m to parse; the instruction requires %H to parse\n git rev-list $merges_option --format=\"%m%H ${format:-%s}\" \\\n@@ -1228,7 +1232,7 @@ do\n \n \tif test t != \"$preserve_merges\"\n \tthen\n-\t\tprintf '%s\\n' \"${comment_out}pick $sha1 $rest\" >>\"$todo\"\n+\t\tprintf '%s\\n' \"${comment_out}${rebasecmd} $sha1 $rest\" >>\"$todo\"\n \telse\n \t\tif test -z \"$rebase_root\"\n \t\tthen\n@@ -1246,7 +1250,7 @@ do\n \t\tif test f = \"$preserve\"\n \t\tthen\n \t\t\ttouch \"$rewritten\"/$sha1\n-\t\t\tprintf '%s\\n' \"${comment_out}pick $sha1 $rest\" >>\"$todo\"\n+\t\t\tprintf '%s\\n' \"${comment_out}${rebasecmd} $sha1 $rest\" >>\"$todo\"\n \t\tfi\n \tfi\n done\n-- \n2.9.3\n\n"},{"id":"317772","messageId":"20170425044320.17840-1-liambeguin@gmail.com","threadId":"45783","inReplyTo":"20170424032347.10878-1-liambeguin@gmail.com","subject":"[PATCH v2] rebase -i: add config to abbreviate command-names","fromName":"Liam Beguin","fromEmail":"liambeguin@gmail.com","sentAt":"2017-04-25T04:43:20Z","receivedAt":"2017-04-25T04:45:06Z","isPatch":true,"sender":{"key":"liambeguin@gmail.com","avatar":"https://avatars.githubusercontent.com/u/3811160?v=4"},"body":"Add the 'rebase.abbrevCmd' boolean config option to allow `git rebase -i`\nto abbreviate the command-names in the instruction list.\n\nThis means that `git rebase -i` would print:\n    p deadbee The oneline of this commit\n    ...\n\ninstead of:\n    pick deadbee The oneline of this commit\n    ...\n\nUsing a single character command-name allows the lines to remain\naligned, making the whole set more readable.\n\nSigned-off-by: Liam Beguin <liambeguin@gmail.com>\n---\nChanges since v1:\n - Improve Documentation and commit message\n\n Documentation/config.txt     | 19 +++++++++++++++++++\n Documentation/git-rebase.txt | 19 +++++++++++++++++++\n git-rebase--interactive.sh   |  8 ++++++--\n 3 files changed, 44 insertions(+), 2 deletions(-)\n\ndiff --git a/Documentation/config.txt b/Documentation/config.txt\nindex 475e874d5155..8b1877f2df91 100644\n--- a/Documentation/config.txt\n+++ b/Documentation/config.txt\n@@ -2614,6 +2614,25 @@ rebase.instructionFormat::\n \tthe instruction list during an interactive rebase.  The format will automatically\n \thave the long commit hash prepended to the format.\n \n+rebase.abbrevCmd::\n+\tIf set to true, `git rebase -i` will abbreviate the command-names in the\n+\tinstruction list. This means that instead of looking like this,\n+\n+-------------------------------------------\n+\tpick deadbee The oneline of this commit\n+\tpick fa1afe1 The oneline of the next commit\n+\t...\n+-------------------------------------------\n+\n+\tthe list would use the short version of the command resulting in\n+\tsomething like this.\n+\n+-------------------------------------------\n+\tp deadbee The oneline of this commit\n+\tp fa1afe1 The oneline of the next commit\n+\t...\n+-------------------------------------------\n+\n receive.advertiseAtomic::\n \tBy default, git-receive-pack will advertise the atomic push\n \tcapability to its clients. If you don't want to advertise this\ndiff --git a/Documentation/git-rebase.txt b/Documentation/git-rebase.txt\nindex 67d48e688315..7d97c0483241 100644\n--- a/Documentation/git-rebase.txt\n+++ b/Documentation/git-rebase.txt\n@@ -222,6 +222,25 @@ rebase.missingCommitsCheck::\n rebase.instructionFormat::\n \tCustom commit list format to use during an `--interactive` rebase.\n \n+rebase.abbrevCmd::\n+\tIf set to true, `git rebase -i` will abbreviate the command-names in the\n+\tinstruction list. This means that instead of looking like this,\n+\n+-------------------------------------------\n+\tpick deadbee The oneline of this commit\n+\tpick fa1afe1 The oneline of the next commit\n+\t...\n+-------------------------------------------\n+\n+\tthe list would use the short version of the command resulting in\n+\tsomething like this.\n+\n+-------------------------------------------\n+\tp deadbee The oneline of this commit\n+\tp fa1afe1 The oneline of the next commit\n+\t...\n+-------------------------------------------\n+\n OPTIONS\n -------\n --onto <newbase>::\ndiff --git a/git-rebase--interactive.sh b/git-rebase--interactive.sh\nindex 2c9c0165b5ab..9f3e82b79615 100644\n--- a/git-rebase--interactive.sh\n+++ b/git-rebase--interactive.sh\n@@ -1210,6 +1210,10 @@ else\n \trevisions=$onto...$orig_head\n \tshortrevisions=$shorthead\n fi\n+\n+rebasecmd=pick\n+test \"$(git config --bool --get rebase.abbrevCmd)\" = true && rebasecmd=p\n+\n format=$(git config --get rebase.instructionFormat)\n # the 'rev-list .. | sed' requires %m to parse; the instruction requires %H to parse\n git rev-list $merges_option --format=\"%m%H ${format:-%s}\" \\\n@@ -1228,7 +1232,7 @@ do\n \n \tif test t != \"$preserve_merges\"\n \tthen\n-\t\tprintf '%s\\n' \"${comment_out}pick $sha1 $rest\" >>\"$todo\"\n+\t\tprintf '%s\\n' \"${comment_out}${rebasecmd} $sha1 $rest\" >>\"$todo\"\n \telse\n \t\tif test -z \"$rebase_root\"\n \t\tthen\n@@ -1246,7 +1250,7 @@ do\n \t\tif test f = \"$preserve\"\n \t\tthen\n \t\t\ttouch \"$rewritten\"/$sha1\n-\t\t\tprintf '%s\\n' \"${comment_out}pick $sha1 $rest\" >>\"$todo\"\n+\t\t\tprintf '%s\\n' \"${comment_out}${rebasecmd} $sha1 $rest\" >>\"$todo\"\n \t\tfi\n \tfi\n done\n-- \n2.9.3\n\n"},{"id":"317784","messageId":"xmqqinltuhiv.fsf@gitster.mtv.corp.google.com","threadId":"45783","inReplyTo":"20170425043742.15529-1-liambeguin@gmail.com","subject":"Re: [PATCH v2] rebase -i: add config to abbreviate command-names","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2017-04-25T06:29:28Z","receivedAt":"2017-04-25T06:29:35Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Liam Beguin <liambeguin@gmail.com> writes:\n\n> Add the 'rebase.abbrevCmd' boolean config option to allow `git rebase -i`\n> to abbreviate the command-names in the instruction list.\n>\n> This means that `git rebase -i` would print:\n>     p deadbee The oneline of this commit\n>     ...\n>\n> instead of:\n>     pick deadbee The oneline of this commit\n>     ...\n\nWhenever I see \"This means that...\", my automatic reaction is \"The\nauthor expects what s/he wrote previously is not understandable, and\nis making another try to give something more readable.  As this is\nnot a real time communication, why not rewrite the incomprehensible\npart before wasting the time of the readers by throwing at them what\nis known to the author to be unreadble, only to clarify with 'This\nmeans that...' later?\"\n\nBut I think in this case, you do not even have to say \"This means\nthat\".  What you wrote, without \"This means that\", i.e.\n\n    Add the 'rebase.abbrevCommand' configuration variable to tell\n    `git rebase -i` to show commands abbreviated in the instruction\n    list, i.e.\n\n         p deadbee The oneline of this commit\n         ...\n\n    instead of:\n\n         pick deadbee The oneline of this commit\n         ...\n\nis quite readable.\n\n> Using a single character command-name allows the lines to remain\n> aligned, making the whole set more readable.\n\nHmph.  I have trouble with \"lines remain aligned\".  Depending on the\nobject names of commits, don't you end up getting something like\nthis that is not aligned?\n\n    p deadbee The oneline\n    p e2cb6ab8 Another commit\n\nOr are you happy with only the beginning of object names aligned,\nwithout the actual titles aligned?\n\nPersonally I am happy with the beginning of each instruction line\naligned, so from that point of view, this patch is a mild Meh to me,\neven though I do a fair amount of \"rebase -i\" myself.  But obviously\nI am not the only user of Git you need to please, so...\n"},{"id":"317788","messageId":"CA+P7+xrXyguugTETd_C-JXDSZ5zHUC3d_1cU4CuiaJjAqWQ=RA@mail.gmail.com","threadId":"45783","inReplyTo":"xmqqinltuhiv.fsf@gitster.mtv.corp.google.com","subject":"Re: [PATCH v2] rebase -i: add config to abbreviate command-names","fromName":"Jacob Keller","fromEmail":"jacob.keller@gmail.com","sentAt":"2017-04-25T08:29:10Z","receivedAt":"2017-04-25T08:29:41Z","isPatch":true,"sender":{"key":"jacob.keller@gmail.com","avatar":"https://avatars.githubusercontent.com/u/874719?v=4"},"body":"On Mon, Apr 24, 2017 at 11:29 PM, Junio C Hamano <gitster@pobox.com> wrote:\n> Personally I am happy with the beginning of each instruction line\n> aligned, so from that point of view, this patch is a mild Meh to me,\n> even though I do a fair amount of \"rebase -i\" myself.  But obviously\n> I am not the only user of Git you need to please, so...\n\nI would instead justify this as making it easier to change the action,\nsince you only need to rewrite a single letter, which at least in vim\ntakes \"r<letter>\" to change the action, vs slightly more keystrokes\nsuch as \"ct <letter\" or otherwise.\n\nAlso, if you change the default commit hash length, it becomes long\nenough to cover most commits and you see all commits at say 12 digits\ncommit hash and everything is nicely aligned.\n\nThanks,\nJake\n"},{"id":"317794","messageId":"87zif4q0cy.fsf@linux-m68k.org","threadId":"45783","inReplyTo":"20170425044320.17840-1-liambeguin@gmail.com","subject":"Re: [PATCH v2] rebase -i: add config to abbreviate command-names","fromName":"Andreas Schwab","fromEmail":"schwab@linux-m68k.org","sentAt":"2017-04-25T09:53:49Z","receivedAt":"2017-04-25T09:54:02Z","isPatch":true,"sender":{"key":"schwab@linux-m68k.org","avatar":"https://avatars.githubusercontent.com/u/2175493?v=4"},"body":"On Apr 25 2017, Liam Beguin <liambeguin@gmail.com> wrote:\n\n> diff --git a/Documentation/config.txt b/Documentation/config.txt\n> index 475e874d5155..8b1877f2df91 100644\n> --- a/Documentation/config.txt\n> +++ b/Documentation/config.txt\n> @@ -2614,6 +2614,25 @@ rebase.instructionFormat::\n>  \tthe instruction list during an interactive rebase.  The format will automatically\n>  \thave the long commit hash prepended to the format.\n>  \n> +rebase.abbrevCmd::\n> +\tIf set to true, `git rebase -i` will abbreviate the command-names in the\n> +\tinstruction list. This means that instead of looking like this,\n> +\n> +-------------------------------------------\n> +\tpick deadbee The oneline of this commit\n> +\tpick fa1afe1 The oneline of the next commit\n> +\t...\n> +-------------------------------------------\n> +\n> +\tthe list would use the short version of the command resulting in\n> +\tsomething like this.\n> +\n> +-------------------------------------------\n> +\tp deadbee The oneline of this commit\n> +\tp fa1afe1 The oneline of the next commit\n> +\t...\n> +-------------------------------------------\n\nThat doesn't explain the point of the option.\n\nAndreas.\n\n-- \nAndreas Schwab, schwab@linux-m68k.org\nGPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5\n\"And now for something completely different.\"\n"},{"id":"317795","messageId":"87vapsq073.fsf@linux-m68k.org","threadId":"45783","inReplyTo":"20170425043742.15529-1-liambeguin@gmail.com","subject":"Re: [PATCH v2] rebase -i: add config to abbreviate command-names","fromName":"Andreas Schwab","fromEmail":"schwab@linux-m68k.org","sentAt":"2017-04-25T09:57:20Z","receivedAt":"2017-04-25T09:57:32Z","isPatch":true,"sender":{"key":"schwab@linux-m68k.org","avatar":"https://avatars.githubusercontent.com/u/2175493?v=4"},"body":"On Apr 25 2017, Liam Beguin <liambeguin@gmail.com> wrote:\n\n> Add the 'rebase.abbrevCmd' boolean config option to allow `git rebase -i`\n> to abbreviate the command-names in the instruction list.\n>\n> This means that `git rebase -i` would print:\n>     p deadbee The oneline of this commit\n>     ...\n>\n> instead of:\n>     pick deadbee The oneline of this commit\n>     ...\n>\n> Using a single character command-name allows the lines to remain\n> aligned, making the whole set more readable.\n\nPerhaps there should rather be an option to tell rebase to align the\ncolumns?\n\nAndreas.\n\n-- \nAndreas Schwab, schwab@linux-m68k.org\nGPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5\n\"And now for something completely different.\"\n"},{"id":"317797","messageId":"D1F52B690614472486B661D6D563DA85@PhilipOakley","threadId":"45783","inReplyTo":"20170425043742.15529-1-liambeguin@gmail.com","subject":"Re: [PATCH v2] rebase -i: add config to abbreviate command-names","fromName":"Philip Oakley","fromEmail":"philipoakley@iee.org","sentAt":"2017-04-25T10:34:38Z","receivedAt":"2017-04-25T10:34:45Z","isPatch":true,"sender":{"key":"philipoakley@iee.email","avatar":"https://avatars.githubusercontent.com/u/914343?v=4"},"body":"From: \"Liam Beguin\" <liambeguin@gmail.com>\n> Add the 'rebase.abbrevCmd' boolean config option to allow `git rebase -i`\n> to abbreviate the command-names in the instruction list.\n>\n> This means that `git rebase -i` would print:\n>    p deadbee The oneline of this commit\n>    ...\n>\n> instead of:\n>    pick deadbee The oneline of this commit\n>    ...\n>\n> Using a single character command-name allows the lines to remain\n> aligned, making the whole set more readable.\n>\n> Signed-off-by: Liam Beguin <liambeguin@gmail.com>\n> ---\n> Changes since v1:\n> - Improve Documentation and commit message\n>\n> Documentation/config.txt     | 19 +++++++++++++++++++\n> Documentation/git-rebase.txt | 19 +++++++++++++++++++\n> git-rebase--interactive.sh   |  8 ++++++--\n> 3 files changed, 44 insertions(+), 2 deletions(-)\n>\n> diff --git a/Documentation/config.txt b/Documentation/config.txt\n> index 475e874d5155..8b1877f2df91 100644\n> --- a/Documentation/config.txt\n> +++ b/Documentation/config.txt\n> @@ -2614,6 +2614,25 @@ rebase.instructionFormat::\n>  the instruction list during an interactive rebase.  The format will \n> automatically\n>  have the long commit hash prepended to the format.\n>\n> +rebase.abbrevCmd::\n> + If set to true, `git rebase -i` will abbreviate the command-names in the\n> + instruction list. This means that instead of looking like this,\n> +\n> +-------------------------------------------\n> + pick deadbee The oneline of this commit\n> + pick fa1afe1 The oneline of the next commit\n> + ...\n> +-------------------------------------------\n> +\n> + the list would use the short version of the command resulting in\n> + something like this.\n\nPerhaps use an example which does have rebase commands of different lengths, \nsuch as 'pick', 'squash', 'reword' to more clearly show the intent of \nalignment and subsequent ease of editing?\n\n--\nPhilip\n\n\n> +\n> +-------------------------------------------\n> + p deadbee The oneline of this commit\n> + p fa1afe1 The oneline of the next commit\n> + ...\n> +-------------------------------------------\n> +\n> receive.advertiseAtomic::\n>  By default, git-receive-pack will advertise the atomic push\n>  capability to its clients. If you don't want to advertise this\n> diff --git a/Documentation/git-rebase.txt b/Documentation/git-rebase.txt\n> index 67d48e688315..7d97c0483241 100644\n> --- a/Documentation/git-rebase.txt\n> +++ b/Documentation/git-rebase.txt\n> @@ -222,6 +222,25 @@ rebase.missingCommitsCheck::\n> rebase.instructionFormat::\n>  Custom commit list format to use during an `--interactive` rebase.\n>\n> +rebase.abbrevCmd::\n> + If set to true, `git rebase -i` will abbreviate the command-names in the\n> + instruction list. This means that instead of looking like this,\n> +\n> +-------------------------------------------\n> + pick deadbee The oneline of this commit\n> + pick fa1afe1 The oneline of the next commit\n> + ...\n> +-------------------------------------------\n> +\n> + the list would use the short version of the command resulting in\n> + something like this.\n> +\n> +-------------------------------------------\n> + p deadbee The oneline of this commit\n> + p fa1afe1 The oneline of the next commit\n> + ...\n> +-------------------------------------------\n> +\n> OPTIONS\n> -------\n> --onto <newbase>::\n> diff --git a/git-rebase--interactive.sh b/git-rebase--interactive.sh\n> index 2c9c0165b5ab..9f3e82b79615 100644\n> --- a/git-rebase--interactive.sh\n> +++ b/git-rebase--interactive.sh\n> @@ -1210,6 +1210,10 @@ else\n>  revisions=$onto...$orig_head\n>  shortrevisions=$shorthead\n> fi\n> +\n> +rebasecmd=pick\n> +test \"$(git config --bool --get rebase.abbrevCmd)\" = true && rebasecmd=p\n> +\n> format=$(git config --get rebase.instructionFormat)\n> # the 'rev-list .. | sed' requires %m to parse; the instruction requires \n> %H to parse\n> git rev-list $merges_option --format=\"%m%H ${format:-%s}\" \\\n> @@ -1228,7 +1232,7 @@ do\n>\n>  if test t != \"$preserve_merges\"\n>  then\n> - printf '%s\\n' \"${comment_out}pick $sha1 $rest\" >>\"$todo\"\n> + printf '%s\\n' \"${comment_out}${rebasecmd} $sha1 $rest\" >>\"$todo\"\n>  else\n>  if test -z \"$rebase_root\"\n>  then\n> @@ -1246,7 +1250,7 @@ do\n>  if test f = \"$preserve\"\n>  then\n>  touch \"$rewritten\"/$sha1\n> - printf '%s\\n' \"${comment_out}pick $sha1 $rest\" >>\"$todo\"\n> + printf '%s\\n' \"${comment_out}${rebasecmd} $sha1 $rest\" >>\"$todo\"\n>  fi\n>  fi\n> done\n> -- \n> 2.9.3\n>\n> \n\n"},{"id":"317814","messageId":"CANoM8SUoMVL4TRGSPYRXOuj0-=QUOJPWss8Uy-pq5VYYEbjAzQ@mail.gmail.com","threadId":"45783","inReplyTo":"87vapsq073.fsf@linux-m68k.org","subject":"Re: [PATCH v2] rebase -i: add config to abbreviate command-names","fromName":"Mike Rappazzo","fromEmail":"rappazzo@gmail.com","sentAt":"2017-04-25T13:59:56Z","receivedAt":"2017-04-25T14:00:27Z","isPatch":true,"sender":{"key":"rappazzo@gmail.com","avatar":"https://avatars.githubusercontent.com/u/525287?v=4"},"body":"On Tue, Apr 25, 2017 at 5:57 AM, Andreas Schwab <schwab@linux-m68k.org> wrote:\n> On Apr 25 2017, Liam Beguin <liambeguin@gmail.com> wrote:\n>\n>> Add the 'rebase.abbrevCmd' boolean config option to allow `git rebase -i`\n>> to abbreviate the command-names in the instruction list.\n>>\n>> This means that `git rebase -i` would print:\n>>     p deadbee The oneline of this commit\n>>     ...\n>>\n>> instead of:\n>>     pick deadbee The oneline of this commit\n>>     ...\n>>\n>> Using a single character command-name allows the lines to remain\n>> aligned, making the whole set more readable.\n>\n> Perhaps there should rather be an option to tell rebase to align the\n> columns?\n>\n\nYou _can_ set a custom instruction format using the config variable:\n`rebase.instructionFormat`.  With this, you can align columns using\nthe normal git log format.\n\nFor example, I personally use this as my instruction format:\n\n    [%an%<|(64)%x5d %s\n\nWhile, this won't always align perfectly, it may help scratch your itch.\n"},{"id":"317833","messageId":"alpine.DEB.2.20.1704252143520.3480@virtualbox","threadId":"45783","inReplyTo":"1493089056.29673.21.camel@gmail.com","subject":"Re: [PATCH] rebase -i: add config to abbreviate command name","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2017-04-25T19:45:00Z","receivedAt":"2017-04-25T19:45:33Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi Liam,\n\nOn Mon, 24 Apr 2017, liam BEGUIN wrote:\n\n> On Mon, 2017-04-24 at 12:26 +0200, Johannes Schindelin wrote:\n> \n> > On Sun, 23 Apr 2017, Liam Beguin wrote:\n> > \n> > > Add the 'rebase.abbrevCmd' boolean config option to allow the user\n> > > to abbreviate the default command name while editing the\n> > > 'git-rebase-todo' file.\n> > \n> > This patch does not handle the `git rebase --edit-todo` subcommand.\n> > Intentional?\n> \n> After a little more investigation, I'm not sure what should be added for\n> the `git rebase --edit-todo` subcommand. It seems like it uses the same\n> text that was added the first time (with `git rebase -i`).\n\nWell, it uses whatever the user may have edited. It may surprise users\nthat their `pick` does not get converted to `p` like all the original\ncommands.\n\nCiao,\nJohannes\n"},{"id":"317834","messageId":"alpine.DEB.2.20.1704252148400.3480@virtualbox","threadId":"45783","inReplyTo":"20170425044320.17840-1-liambeguin@gmail.com","subject":"Re: [PATCH v2] rebase -i: add config to abbreviate command-names","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2017-04-25T20:08:19Z","receivedAt":"2017-04-25T20:08:38Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi Liam,\n\nOn Tue, 25 Apr 2017, Liam Beguin wrote:\n\n> Add the 'rebase.abbrevCmd' boolean config option to allow `git rebase -i`\n> to abbreviate the command-names in the instruction list.\n> \n> This means that `git rebase -i` would print:\n>     p deadbee The oneline of this commit\n>     ...\n> \n> instead of:\n>     pick deadbee The oneline of this commit\n>     ...\n> \n> Using a single character command-name allows the lines to remain\n> aligned, making the whole set more readable.\n> \n> Signed-off-by: Liam Beguin <liambeguin@gmail.com>\n\nApart from either abbreviating commands after --edit-todo, or documenting\nexplicitly that the new config option only concerns the initial todo list,\nthere is another problem that just occurred to me: --exec.\n\nWhen you call `git rebase -x \"make DEVELOPER=1 -j15\"`, the idea is to\nappend an \"exec make DEVELOPER=1 -j15\" line after every pick line. The\ncode in question looks like this:\n\nadd_exec_commands () {\n        {\n                first=t\n                while read -r insn rest\n                do\n                        case $insn in\n                        pick)\n                                test -n \"$first\" ||\n                                printf \"%s\" \"$cmd\"\n                                ;;\n                        esac\n                        printf \"%s %s\\n\" \"$insn\" \"$rest\"\n                        first=\n                done\n                printf \"%s\" \"$cmd\"\n        } <\"$1\" >\"$1.new\" &&\n        mv \"$1.new\" \"$1\"\n}\n\nObviously, the git-rebase--interactive script expects at this point that\nthe command is spelled out, so your patch needs to change the `pick)` case\nto `p|pick)`, I think.\n\nIn addition, since the rationale for the new option is to align the lines\nbetter, the `exec` would need to be replaced by `x`, and as multiple `-x`\noptions are allowed, you would need something like this at the beginning\nof `add_exec_commands`, too:\n\n\t# abbreviate `exec` if rebase.abbrevCmd is true\n\ttest p != \"$rebasecmd\" ||\n\tcmd=\"$(echo \"$cmd\" | sed 's/^exec/x/')\"\n\nAlso:\n\n> diff --git a/Documentation/config.txt b/Documentation/config.txt\n> index 475e874d5155..8b1877f2df91 100644\n> --- a/Documentation/config.txt\n> +++ b/Documentation/config.txt\n> @@ -2614,6 +2614,25 @@ rebase.instructionFormat::\n>  \tthe instruction list during an interactive rebase.  The format will automatically\n>  \thave the long commit hash prepended to the format.\n>  \n> +rebase.abbrevCmd::\n\nIt does not fail to amuse that the term \"abbrevCmd\" is abbreviated\nheavily itself. However, I would strongly suggest to avoid that. It would\nbe much more pleasant to call the config option rebase.abbreviateCommands\n\n> +rebase.abbrevCmd::\n> +\tIf set to true, `git rebase -i` will abbreviate the command-names in the\n> +\tinstruction list. This means that instead of looking like this,\n\nThis is by no means your fault, but it is really horrible by how many\ndifferent names Git's documentation refers to the todo script, nothing\nshort of confusing. It is the todo script (which I called it initially,\nmaybe not a good name, but it has the merit of the longest tradition at\nleast), the todo list, the instruction sheet, the rebase script, the\ninstruction list... etc\n\nHowever, the thing is called \"todo list\" elsewhere in the same file,\ntherefore lets try to avoid even more confusion and use that term instead\nof \"instruction list\" here.\n\n> diff --git a/git-rebase--interactive.sh b/git-rebase--interactive.sh\n> index 2c9c0165b5ab..9f3e82b79615 100644\n> --- a/git-rebase--interactive.sh\n> +++ b/git-rebase--interactive.sh\n> @@ -1210,6 +1210,10 @@ else\n>  \trevisions=$onto...$orig_head\n>  \tshortrevisions=$shorthead\n>  fi\n> +\n> +rebasecmd=pick\n> +test \"$(git config --bool --get rebase.abbrevCmd)\" = true && rebasecmd=p\n\nA better name would be \"pickcmd\", as there are more rebase commands than\njust `pick` and what we want here is really only associated with one of\nthose commands.\n\nCiao,\nJohannes\n"},{"id":"317860","messageId":"alpine.DEB.2.20.1704252318080.3480@virtualbox","threadId":"45783","inReplyTo":"87zif4q0cy.fsf@linux-m68k.org","subject":"Re: [PATCH v2] rebase -i: add config to abbreviate command-names","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2017-04-25T21:23:17Z","receivedAt":"2017-04-25T21:23:34Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi Andreas,\n\nOn Tue, 25 Apr 2017, Andreas Schwab wrote:\n\n> On Apr 25 2017, Liam Beguin <liambeguin@gmail.com> wrote:\n> \n> > diff --git a/Documentation/config.txt b/Documentation/config.txt\n> > index 475e874d5155..8b1877f2df91 100644\n> > --- a/Documentation/config.txt\n> > +++ b/Documentation/config.txt\n> > @@ -2614,6 +2614,25 @@ rebase.instructionFormat::\n> >  \tthe instruction list during an interactive rebase.  The format will automatically\n> >  \thave the long commit hash prepended to the format.\n> >  \n> > +rebase.abbrevCmd::\n> > +\tIf set to true, `git rebase -i` will abbreviate the command-names in the\n> > +\tinstruction list. This means that instead of looking like this,\n> > +\n> > +-------------------------------------------\n> > +\tpick deadbee The oneline of this commit\n> > +\tpick fa1afe1 The oneline of the next commit\n> > +\t...\n> > +-------------------------------------------\n> > +\n> > +\tthe list would use the short version of the command resulting in\n> > +\tsomething like this.\n> > +\n> > +-------------------------------------------\n> > +\tp deadbee The oneline of this commit\n> > +\tp fa1afe1 The oneline of the next commit\n> > +\t...\n> > +-------------------------------------------\n> \n> That doesn't explain the point of the option.\n\nAnd what you forgot to say in order to make this a constructive criticism\nis: we probably want to add a sentence like this:\n\n\n\tUsing the one-letter abbreviations will align the lines better\n\tin case that the non-abbreviated commands have different lengths.\n\nSpeaking of commands with different lengths, I just thought of fixup and\nsquash. I do not think those are handled by the patch, but they should be\n(the `action` in the first loop of `rearrange_squash` should abbreviate\nvia `test p != \"$pickcmd\" || action=${action%${action#?}}`).\n\nCiao,\nJohannes\n"},{"id":"317872","messageId":"1493160991.29673.26.camel@gmail.com","threadId":"45783","inReplyTo":"alpine.DEB.2.20.1704252318080.3480@virtualbox","subject":"Re: [PATCH v2] rebase -i: add config to abbreviate command-names","fromName":"liam BEGUIN","fromEmail":"liambeguin@gmail.com","sentAt":"2017-04-25T22:56:31Z","receivedAt":"2017-04-25T22:57:29Z","isPatch":true,"sender":{"key":"liambeguin@gmail.com","avatar":"https://avatars.githubusercontent.com/u/3811160?v=4"},"body":"Hi Johannes,\n\n\nOn Tue, 2017-04-25 at 23:23 +0200, Johannes Schindelin wrote:\n> Hi Andreas,\n> \n> On Tue, 25 Apr 2017, Andreas Schwab wrote:\n> \n> > On Apr 25 2017, Liam Beguin <liambeguin@gmail.com> wrote:\n> > \n> > > diff --git a/Documentation/config.txt b/Documentation/config.txt\n> > > index 475e874d5155..8b1877f2df91 100644\n> > > --- a/Documentation/config.txt\n> > > +++ b/Documentation/config.txt\n> > > @@ -2614,6 +2614,25 @@ rebase.instructionFormat::\n> > >  \tthe instruction list during an interactive rebase.  The format will automatically\n> > >  \thave the long commit hash prepended to the format.\n> > >  \n> > > +rebase.abbrevCmd::\n> > > +\tIf set to true, `git rebase -i` will abbreviate the command-names in the\n> > > +\tinstruction list. This means that instead of looking like this,\n> > > +\n> > > +-------------------------------------------\n> > > +\tpick deadbee The oneline of this commit\n> > > +\tpick fa1afe1 The oneline of the next commit\n> > > +\t...\n> > > +-------------------------------------------\n> > > +\n> > > +\tthe list would use the short version of the command resulting in\n> > > +\tsomething like this.\n> > > +\n> > > +-------------------------------------------\n> > > +\tp deadbee The oneline of this commit\n> > > +\tp fa1afe1 The oneline of the next commit\n> > > +\t...\n> > > +-------------------------------------------\n> > \n> > That doesn't explain the point of the option.\n> \n> And what you forgot to say in order to make this a constructive criticism\n> is: we probably want to add a sentence like this:\n> \n> \n> \tUsing the one-letter abbreviations will align the lines better\n> \tin case that the non-abbreviated commands have different lengths.\n> \n> Speaking of commands with different lengths, I just thought of fixup and\n> squash. I do not think those are handled by the patch, but they should be\n> (the `action` in the first loop of `rearrange_squash` should abbreviate\n> via `test p != \"$pickcmd\" || action=${action%${action#?}}`).\n> \n\nI just noticed this today, I'll make changes to handle this case. \n\n> Ciao,\n> Johannes\n\nThanks,\nLiam\n"},{"id":"317873","messageId":"1493161101.29673.27.camel@gmail.com","threadId":"45783","inReplyTo":"alpine.DEB.2.20.1704252143520.3480@virtualbox","subject":"Re: [PATCH] rebase -i: add config to abbreviate command name","fromName":"liam BEGUIN","fromEmail":"liambeguin@gmail.com","sentAt":"2017-04-25T22:58:21Z","receivedAt":"2017-04-25T22:58:41Z","isPatch":true,"sender":{"key":"liambeguin@gmail.com","avatar":"https://avatars.githubusercontent.com/u/3811160?v=4"},"body":"Hi Johannes,\n\nOn Tue, 2017-04-25 at 21:45 +0200, Johannes Schindelin wrote:\n> Hi Liam,\n> \n> On Mon, 24 Apr 2017, liam BEGUIN wrote:\n> \n> > On Mon, 2017-04-24 at 12:26 +0200, Johannes Schindelin wrote:\n> > \n> > > On Sun, 23 Apr 2017, Liam Beguin wrote:\n> > > \n> > > > Add the 'rebase.abbrevCmd' boolean config option to allow the user\n> > > > to abbreviate the default command name while editing the\n> > > > 'git-rebase-todo' file.\n> > > \n> > > This patch does not handle the `git rebase --edit-todo` subcommand.\n> > > Intentional?\n> > \n> > After a little more investigation, I'm not sure what should be added for\n> > the `git rebase --edit-todo` subcommand. It seems like it uses the same\n> > text that was added the first time (with `git rebase -i`).\n> \n> Well, it uses whatever the user may have edited. It may surprise users\n> that their `pick` does not get converted to `p` like all the original\n> commands.\n> \n\nIt makes more sens to me now, I'll add it in next patch\n\n> Ciao,\n> Johannes\n\nThanks, \nLiam\n"},{"id":"317875","messageId":"1493163266.29673.29.camel@gmail.com","threadId":"45783","inReplyTo":"CA+P7+xrXyguugTETd_C-JXDSZ5zHUC3d_1cU4CuiaJjAqWQ=RA@mail.gmail.com","subject":"Re: [PATCH v2] rebase -i: add config to abbreviate command-names","fromName":"liam Beguin","fromEmail":"liambeguin@gmail.com","sentAt":"2017-04-25T23:34:26Z","receivedAt":"2017-04-25T23:35:00Z","isPatch":true,"sender":{"key":"liambeguin@gmail.com","avatar":"https://avatars.githubusercontent.com/u/3811160?v=4"},"body":"Hi Jake, \n\nOn Tue, 2017-04-25 at 01:29 -0700, Jacob Keller wrote:\n> On Mon, Apr 24, 2017 at 11:29 PM, Junio C Hamano <gitster@pobox.com> wrote:\n> > Personally I am happy with the beginning of each instruction line\n> > aligned, so from that point of view, this patch is a mild Meh to me,\n> > even though I do a fair amount of \"rebase -i\" myself.  But obviously\n> > I am not the only user of Git you need to please, so...\n> \n> I would instead justify this as making it easier to change the action,\n> since you only need to rewrite a single letter, which at least in vim\n> takes \"r<letter>\" to change the action, vs slightly more keystrokes\n> such as \"ct <letter\" or otherwise.\n\nIt's another reason that motivated the change but I didn't think the\nvim shortcuts would justify the patch. Since you pointed it out, \nI'll probably add it.\n\n> \n> Also, if you change the default commit hash length, it becomes long\n> enough to cover most commits and you see all commits at say 12 digits\n> commit hash and everything is nicely aligned.\n> \n> Thanks,\n> Jake\n\nThanks,\nLiam \n"},{"id":"317884","messageId":"1493165607.29673.31.camel@gmail.com","threadId":"45783","inReplyTo":"alpine.DEB.2.20.1704252148400.3480@virtualbox","subject":"Re: [PATCH v2] rebase -i: add config to abbreviate command-names","fromName":"liam Beguin","fromEmail":"liambeguin@gmail.com","sentAt":"2017-04-26T00:13:27Z","receivedAt":"2017-04-26T00:25:12Z","isPatch":true,"sender":{"key":"liambeguin@gmail.com","avatar":"https://avatars.githubusercontent.com/u/3811160?v=4"},"body":"Hi Johannes, \n\nOn Tue, 2017-04-25 at 22:08 +0200, Johannes Schindelin wrote:\n> Hi Liam,\n> \n> On Tue, 25 Apr 2017, Liam Beguin wrote:\n> \n> > Add the 'rebase.abbrevCmd' boolean config option to allow `git rebase -i`\n> > to abbreviate the command-names in the instruction list.\n> > \n> > This means that `git rebase -i` would print:\n> >     p deadbee The oneline of this commit\n> >     ...\n> > \n> > instead of:\n> >     pick deadbee The oneline of this commit\n> >     ...\n> > \n> > Using a single character command-name allows the lines to remain\n> > aligned, making the whole set more readable.\n> > \n> > Signed-off-by: Liam Beguin <liambeguin@gmail.com>\n> \n> Apart from either abbreviating commands after --edit-todo, or documenting\n> explicitly that the new config option only concerns the initial todo list,\n> there is another problem that just occurred to me: --exec.\n> \n> When you call `git rebase -x \"make DEVELOPER=1 -j15\"`, the idea is to\n> append an \"exec make DEVELOPER=1 -j15\" line after every pick line. The\n> code in question looks like this:\n> \n> add_exec_commands () {\n>         {\n>                 first=t\n>                 while read -r insn rest\n>                 do\n>                         case $insn in\n>                         pick)\n>                                 test -n \"$first\" ||\n>                                 printf \"%s\" \"$cmd\"\n>                                 ;;\n>                         esac\n>                         printf \"%s %s\\n\" \"$insn\" \"$rest\"\n>                         first=\n>                 done\n>                 printf \"%s\" \"$cmd\"\n>         } <\"$1\" >\"$1.new\" &&\n>         mv \"$1.new\" \"$1\"\n> }\n> \n> Obviously, the git-rebase--interactive script expects at this point that\n> the command is spelled out, so your patch needs to change the `pick)` case\n> to `p|pick)`, I think.\n> \n> In addition, since the rationale for the new option is to align the lines\n> better, the `exec` would need to be replaced by `x`, and as multiple `-x`\n> options are allowed, you would need something like this at the beginning\n> of `add_exec_commands`, too:\n> \n> \t# abbreviate `exec` if rebase.abbrevCmd is true\n> \ttest p != \"$rebasecmd\" ||\n> \tcmd=\"$(echo \"$cmd\" | sed 's/^exec/x/')\"\n> \n\n\n\n> Also:\n> \n> > diff --git a/Documentation/config.txt b/Documentation/config.txt\n> > index 475e874d5155..8b1877f2df91 100644\n> > --- a/Documentation/config.txt\n> > +++ b/Documentation/config.txt\n> > @@ -2614,6 +2614,25 @@ rebase.instructionFormat::\n> >  \tthe instruction list during an interactive rebase.  The format will automatically\n> >  \thave the long commit hash prepended to the format.\n> >  \n> > +rebase.abbrevCmd::\n> \n> It does not fail to amuse that the term \"abbrevCmd\" is abbreviated\n> heavily itself. However, I would strongly suggest to avoid that. It would\n> be much more pleasant to call the config option rebase.abbreviateCommands\n\nI tried to use something similar to the rest of the options but I guess that\nwould be best.\n\n> \n> > +rebase.abbrevCmd::\n> > +\tIf set to true, `git rebase -i` will abbreviate the command-names in the\n> > +\tinstruction list. This means that instead of looking like this,\n> \n> This is by no means your fault, but it is really horrible by how many\n> different names Git's documentation refers to the todo script, nothing\n> short of confusing. It is the todo script (which I called it initially,\n> maybe not a good name, but it has the merit of the longest tradition at\n> least), the todo list, the instruction sheet, the rebase script, the\n> instruction list... etc\n> \n> However, the thing is called \"todo list\" elsewhere in the same file,\n> therefore lets try to avoid even more confusion and use that term instead\n> of \"instruction list\" here.\n\nthanks for pointing this out, I was not quite sure what to call this list.\n\n> \n> > diff --git a/git-rebase--interactive.sh b/git-rebase--interactive.sh\n> > index 2c9c0165b5ab..9f3e82b79615 100644\n> > --- a/git-rebase--interactive.sh\n> > +++ b/git-rebase--interactive.sh\n> > @@ -1210,6 +1210,10 @@ else\n> >  \trevisions=$onto...$orig_head\n> >  \tshortrevisions=$shorthead\n> >  fi\n> > +\n> > +rebasecmd=pick\n> > +test \"$(git config --bool --get rebase.abbrevCmd)\" = true && rebasecmd=p\n> \n> A better name would be \"pickcmd\", as there are more rebase commands than\n> just `pick` and what we want here is really only associated with one of\n> those commands.\n\nWouldn't that make it confusing when the patch starts to handle other commands?\nA common name across the script would limit further confusion.\nI noticed that it is already called `action` in `rearrange_squash`.\nwould that do? (even though it has no reference to 'command')\n\n> \n> Ciao,\n> Johannes\n\nThanks for the detailed answer,\nLiam\n"},{"id":"317887","messageId":"20170426014704.blyczgmbuqd5amys@sigill.intra.peff.net","threadId":"45783","inReplyTo":"1493165607.29673.31.camel@gmail.com","subject":"Re: [PATCH v2] rebase -i: add config to abbreviate command-names","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2017-04-26T01:47:05Z","receivedAt":"2017-04-26T01:47:17Z","isPatch":true,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Tue, Apr 25, 2017 at 08:13:27PM -0400, liam Beguin wrote:\n\n> > > +rebase.abbrevCmd::\n> > > +\tIf set to true, `git rebase -i` will abbreviate the command-names in the\n> > > +\tinstruction list. This means that instead of looking like this,\n> > \n> > This is by no means your fault, but it is really horrible by how many\n> > different names Git's documentation refers to the todo script, nothing\n> > short of confusing. It is the todo script (which I called it initially,\n> > maybe not a good name, but it has the merit of the longest tradition at\n> > least), the todo list, the instruction sheet, the rebase script, the\n> > instruction list... etc\n> > \n> > However, the thing is called \"todo list\" elsewhere in the same file,\n> > therefore lets try to avoid even more confusion and use that term instead\n> > of \"instruction list\" here.\n> \n> thanks for pointing this out, I was not quite sure what to call this list.\n\nI think the words \"instruction list\" may have come from my suggestion. I\nused them because that is the term used in the rebase.instructionFormat\ndocumentation directly above the option you are adding.\n\nIt may be worth a follow-on patch to convert that one to \"todo list\" if\nthat's the preferred name.\n\n-Peff\n"},{"id":"317892","messageId":"xmqqefwfudgo.fsf@gitster.mtv.corp.google.com","threadId":"45783","inReplyTo":"CA+P7+xrXyguugTETd_C-JXDSZ5zHUC3d_1cU4CuiaJjAqWQ=RA@mail.gmail.com","subject":"Re: [PATCH v2] rebase -i: add config to abbreviate command-names","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2017-04-26T02:09:27Z","receivedAt":"2017-04-26T02:09:33Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Jacob Keller <jacob.keller@gmail.com> writes:\n\n> On Mon, Apr 24, 2017 at 11:29 PM, Junio C Hamano <gitster@pobox.com> wrote:\n>> Personally I am happy with the beginning of each instruction line\n>> aligned, so from that point of view, this patch is a mild Meh to me,\n>> even though I do a fair amount of \"rebase -i\" myself.  But obviously\n>> I am not the only user of Git you need to please, so...\n>\n> I would instead justify this as making it easier to change the action,\n> since you only need to rewrite a single letter, which at least in vim\n> takes \"r<letter>\" to change the action, vs slightly more keystrokes\n> such as \"ct <letter\" or otherwise.\n\nThat makes sense to me too.\n"},{"id":"317897","messageId":"xmqqpofzstsf.fsf@gitster.mtv.corp.google.com","threadId":"45783","inReplyTo":"20170426014704.blyczgmbuqd5amys@sigill.intra.peff.net","subject":"Re: [PATCH v2] rebase -i: add config to abbreviate command-names","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2017-04-26T03:59:44Z","receivedAt":"2017-04-26T03:59:53Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Jeff King <peff@peff.net> writes:\n\n> I think the words \"instruction list\" may have come from my suggestion. I\n> used them because that is the term used in the rebase.instructionFormat\n> documentation directly above the option you are adding.\n>\n> It may be worth a follow-on patch to convert that one to \"todo list\" if\n> that's the preferred name.\n\nRunning\n\n$ git grep -i -e 'instruction [ls]' -e 'todo l'\n\nlets us count how we call them, and we can see there is only one\ninstance of 'instruction list'.\n\nRunning the above in v1.7.3 tree shows that it was originally called\n'todo list', and we can see that an enhancement of cherry-pick in\ncd4093b6 (\"Merge branch 'rr/revert-cherry-pick-continue'\",\n2011-10-05)) started calling this instruction sheet around v1.7.8.\n\nA follow-on patch to unify all three would be nice, indeed.\n\nThanks.\n\n"},{"id":"317912","messageId":"alpine.DEB.2.20.1704261124250.3480@virtualbox","threadId":"45783","inReplyTo":"xmqqpofzstsf.fsf@gitster.mtv.corp.google.com","subject":"Re: [PATCH v2] rebase -i: add config to abbreviate command-names","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2017-04-26T09:25:25Z","receivedAt":"2017-04-26T09:29:14Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi Junio,\n\nOn Tue, 25 Apr 2017, Junio C Hamano wrote:\n\n> Running\n> \n> $ git grep -i -e 'instruction [ls]' -e 'todo l'\n> \n> lets us count how we call them, and we can see there is only one\n> instance of 'instruction list'.\n> \n> Running the above in v1.7.3 tree shows that it was originally called\n> 'todo list', and we can see that an enhancement of cherry-pick in\n> cd4093b6 (\"Merge branch 'rr/revert-cherry-pick-continue'\",\n> 2011-10-05)) started calling this instruction sheet around v1.7.8.\n> \n> A follow-on patch to unify all three would be nice, indeed.\n\nBut we cannot unify them, as the config option's name uses \"instruction\"\nand to keep backwards-compatibility, we are simply unable to resolve the\nconfusion.\n\nCiao,\nDscho\n"},{"id":"317913","messageId":"alpine.DEB.2.20.1704261126130.3480@virtualbox","threadId":"45783","inReplyTo":"1493165607.29673.31.camel@gmail.com","subject":"Re: [PATCH v2] rebase -i: add config to abbreviate command-names","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2017-04-26T09:28:16Z","receivedAt":"2017-04-26T09:47:04Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi Liam,\n\nOn Tue, 25 Apr 2017, liam Beguin wrote:\n\n> On Tue, 2017-04-25 at 22:08 +0200, Johannes Schindelin wrote:\n> > \n> > On Tue, 25 Apr 2017, Liam Beguin wrote:\n> > \n> > > diff --git a/git-rebase--interactive.sh b/git-rebase--interactive.sh\n> > > index 2c9c0165b5ab..9f3e82b79615 100644\n> > > --- a/git-rebase--interactive.sh\n> > > +++ b/git-rebase--interactive.sh\n> > > @@ -1210,6 +1210,10 @@ else\n> > >  \trevisions=$onto...$orig_head\n> > >  \tshortrevisions=$shorthead\n> > >  fi\n> > > +\n> > > +rebasecmd=pick\n> > > +test \"$(git config --bool --get rebase.abbrevCmd)\" = true && rebasecmd=p\n> > \n> > A better name would be \"pickcmd\", as there are more rebase commands than\n> > just `pick` and what we want here is really only associated with one of\n> > those commands.\n> \n> Wouldn't that make it confusing when the patch starts to handle other\n> commands?\n\nOnly if you use that variable to hold other values than `pick` or `p`. But\nyou do not plan on that, right? You plan to use this variable only to hold\nthe value `pick` by default and `p` in case the user asked for abbreviated\ncommands. Therefore, I think it makes sense to reflect in the variable\nname that the purpose is really only to reflect the string used for the\n`pick` command (as opposed to any other todo command).\n\nCiao,\nJohannes"},{"id":"317933","messageId":"CACBZZX49HZbQ32TTM8V3hSHwEJxkewV3VwfJO75u+D-9RmsOtw@mail.gmail.com","threadId":"45783","inReplyTo":"20170425044320.17840-1-liambeguin@gmail.com","subject":"Re: [PATCH v2] rebase -i: add config to abbreviate command-names","fromName":"Ævar Arnfjörð Bjarmason","fromEmail":"avarab@gmail.com","sentAt":"2017-04-26T15:24:21Z","receivedAt":"2017-04-26T15:25:26Z","isPatch":true,"sender":{"key":"avarab@gmail.com","avatar":"https://avatars.githubusercontent.com/u/45301?v=4"},"body":"On Tue, Apr 25, 2017 at 6:43 AM, Liam Beguin <liambeguin@gmail.com> wrote:\n> Add the 'rebase.abbrevCmd' boolean config option to allow `git rebase -i`\n> to abbreviate the command-names in the instruction list.\n>\n> This means that `git rebase -i` would print:\n>     p deadbee The oneline of this commit\n>     ...\n>\n> instead of:\n>     pick deadbee The oneline of this commit\n>     ...\n>\n> Using a single character command-name allows the lines to remain\n> aligned, making the whole set more readable.\n\nAside from the existing comments about the commit message from others,\nyou should be noting that we *already* have these abbreviations for\nall the todo list options, and we note this in append_todo_help.\n\n\n> +rebase.abbrevCmd::\n> +       If set to true, `git rebase -i` will abbreviate the command-names in the\n> +       instruction list. This means that instead of looking like this,\n> +\n> [...]\n> +rebase.abbrevCmd::\n> +       If set to true, `git rebase -i` will abbreviate the command-names in the\n> +       instruction list. This means that instead of looking like this,\n> [...]\n\nBetter to split this out into a new *.txt file and use the include::*\nfacility (grep for it) rather than copy/pasting this entirely across\ntwo files.\n\n>  OPTIONS\n>  -------\n>  --onto <newbase>::\n> diff --git a/git-rebase--interactive.sh b/git-rebase--interactive.sh\n> index 2c9c0165b5ab..9f3e82b79615 100644\n> --- a/git-rebase--interactive.sh\n> +++ b/git-rebase--interactive.sh\n> @@ -1210,6 +1210,10 @@ else\n>         revisions=$onto...$orig_head\n>         shortrevisions=$shorthead\n>  fi\n> +\n> +rebasecmd=pick\n> +test \"$(git config --bool --get rebase.abbrevCmd)\" = true && rebasecmd=p\n\nRather than hardcoding \"p\" here maybe it would be worthhwile to make\nthat into a variable used both here and in append_todo_help, maybe\nnot...\n\n>  format=$(git config --get rebase.instructionFormat)\n>  # the 'rev-list .. | sed' requires %m to parse; the instruction requires %H to parse\n>  git rev-list $merges_option --format=\"%m%H ${format:-%s}\" \\\n> @@ -1228,7 +1232,7 @@ do\n>\n>         if test t != \"$preserve_merges\"\n>         then\n> -               printf '%s\\n' \"${comment_out}pick $sha1 $rest\" >>\"$todo\"\n> +               printf '%s\\n' \"${comment_out}${rebasecmd} $sha1 $rest\" >>\"$todo\"\n>         else\n>                 if test -z \"$rebase_root\"\n>                 then\n> @@ -1246,7 +1250,7 @@ do\n>                 if test f = \"$preserve\"\n>                 then\n>                         touch \"$rewritten\"/$sha1\n> -                       printf '%s\\n' \"${comment_out}pick $sha1 $rest\" >>\"$todo\"\n> +                       printf '%s\\n' \"${comment_out}${rebasecmd} $sha1 $rest\" >>\"$todo\"\n>                 fi\n>         fi\n>  done\n\nI haven't tried applying & running this patch, but it seems you\ndefinitely missed the case where --autosquash will add fixup or\nsquash, that should be f or s with your patch, but you didn't change\nthat code. See the rearrange_squash function.\n\nDitto for turning \"exec\" into \"e\" with --exec.\n\nBut if the motivation for this entire thing is to make sure the\ncommands are aligned this doesn't fix that, because the sha1s can be\nof different lengths. So as others have pointed out maybe this entire\nthing should be dropped & replaced with some bool command to align the\ntodo list, maybe turning that on by default.\n\nUnless the real unstated reason is to make this easier to edit in vim\nor something, in which case this approach seems reasonable.\n"},{"id":"318019","messageId":"xmqqa872r8ha.fsf@gitster.mtv.corp.google.com","threadId":"45783","inReplyTo":"alpine.DEB.2.20.1704261124250.3480@virtualbox","subject":"Re: [PATCH v2] rebase -i: add config to abbreviate command-names","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2017-04-27T00:37:37Z","receivedAt":"2017-04-27T00:37:44Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:\n\n> Hi Junio,\n>\n> On Tue, 25 Apr 2017, Junio C Hamano wrote:\n>\n>> Running\n>> \n>> $ git grep -i -e 'instruction [ls]' -e 'todo l'\n>> \n>> lets us count how we call them, and we can see there is only one\n>> instance of 'instruction list'.\n>> \n>> Running the above in v1.7.3 tree shows that it was originally called\n>> 'todo list', and we can see that an enhancement of cherry-pick in\n>> cd4093b6 (\"Merge branch 'rr/revert-cherry-pick-continue'\",\n>> 2011-10-05)) started calling this instruction sheet around v1.7.8.\n>> \n>> A follow-on patch to unify all three would be nice, indeed.\n>\n> But we cannot unify them, as the config option's name uses \"instruction\"\n> and to keep backwards-compatibility, we are simply unable to resolve the\n> confusion.\n\nWe can correct historical mistakes by introducing preferred synonym\nto misnamed configuration variables, clearly document why we prefer\nit over the misnamed one that is now deprecated, and then eventually\ndropping it at a major version boundary.\n"},{"id":"318024","messageId":"1493256051.29673.35.camel@gmail.com","threadId":"45783","inReplyTo":"CACBZZX49HZbQ32TTM8V3hSHwEJxkewV3VwfJO75u+D-9RmsOtw@mail.gmail.com","subject":"Re: [PATCH v2] rebase -i: add config to abbreviate command-names","fromName":"liam Beguin","fromEmail":"liambeguin@gmail.com","sentAt":"2017-04-27T01:20:51Z","receivedAt":"2017-04-27T01:21:20Z","isPatch":true,"sender":{"key":"liambeguin@gmail.com","avatar":"https://avatars.githubusercontent.com/u/3811160?v=4"},"body":"Hi Ævar,\n\nOn Wed, 2017-04-26 at 17:24 +0200, Ævar Arnfjörð Bjarmason wrote:\n> On Tue, Apr 25, 2017 at 6:43 AM, Liam Beguin <liambeguin@gmail.com> wrote:\n> > Add the 'rebase.abbrevCmd' boolean config option to allow `git rebase -i`\n> > to abbreviate the command-names in the instruction list.\n> > \n> > This means that `git rebase -i` would print:\n> >     p deadbee The oneline of this commit\n> >     ...\n> > \n> > instead of:\n> >     pick deadbee The oneline of this commit\n> >     ...\n> > \n> > Using a single character command-name allows the lines to remain\n> > aligned, making the whole set more readable.\n> \n> Aside from the existing comments about the commit message from others,\n> you should be noting that we *already* have these abbreviations for\n> all the todo list options, and we note this in append_todo_help.\n> \n> \n> > +rebase.abbrevCmd::\n> > +       If set to true, `git rebase -i` will abbreviate the command-names in the\n> > +       instruction list. This means that instead of looking like this,\n> > +\n> > [...]\n> > +rebase.abbrevCmd::\n> > +       If set to true, `git rebase -i` will abbreviate the command-names in the\n> > +       instruction list. This means that instead of looking like this,\n> > [...]\n> \n> Better to split this out into a new *.txt file and use the include::*\n> facility (grep for it) rather than copy/pasting this entirely across\n> two files.\n> \n\nThanks for pointing this out, I'll update the documentation\n\n> >  OPTIONS\n> >  -------\n> >  --onto <newbase>::\n> > diff --git a/git-rebase--interactive.sh b/git-rebase--interactive.sh\n> > index 2c9c0165b5ab..9f3e82b79615 100644\n> > --- a/git-rebase--interactive.sh\n> > +++ b/git-rebase--interactive.sh\n> > @@ -1210,6 +1210,10 @@ else\n> >         revisions=$onto...$orig_head\n> >         shortrevisions=$shorthead\n> >  fi\n> > +\n> > +rebasecmd=pick\n> > +test \"$(git config --bool --get rebase.abbrevCmd)\" = true && rebasecmd=p\n> \n> Rather than hardcoding \"p\" here maybe it would be worthhwile to make\n> that into a variable used both here and in append_todo_help, maybe\n> not...\n> \n\nI'm not sure I understand, do you mean that the option should also affect the\nmessage added by append_todo_help ?\n\n> >  format=$(git config --get rebase.instructionFormat)\n> >  # the 'rev-list .. | sed' requires %m to parse; the instruction requires %H to parse\n> >  git rev-list $merges_option --format=\"%m%H ${format:-%s}\" \\\n> > @@ -1228,7 +1232,7 @@ do\n> > \n> >         if test t != \"$preserve_merges\"\n> >         then\n> > -               printf '%s\\n' \"${comment_out}pick $sha1 $rest\" >>\"$todo\"\n> > +               printf '%s\\n' \"${comment_out}${rebasecmd} $sha1 $rest\" >>\"$todo\"\n> >         else\n> >                 if test -z \"$rebase_root\"\n> >                 then\n> > @@ -1246,7 +1250,7 @@ do\n> >                 if test f = \"$preserve\"\n> >                 then\n> >                         touch \"$rewritten\"/$sha1\n> > -                       printf '%s\\n' \"${comment_out}pick $sha1 $rest\" >>\"$todo\"\n> > +                       printf '%s\\n' \"${comment_out}${rebasecmd} $sha1 $rest\" >>\"$todo\"\n> >                 fi\n> >         fi\n> >  done\n> \n> I haven't tried applying & running this patch, but it seems you\n> definitely missed the case where --autosquash will add fixup or\n> squash, that should be f or s with your patch, but you didn't change\n> that code. See the rearrange_squash function.\n> \n> Ditto for turning \"exec\" into \"e\" with --exec.\n> \n\nI noticed this yesterday, I'll add both cases the next iteration.\n\n> But if the motivation for this entire thing is to make sure the\n> commands are aligned this doesn't fix that, because the sha1s can be\n> of different lengths. So as others have pointed out maybe this entire\n> thing should be dropped & replaced with some bool command to align the\n> todo list, maybe turning that on by default.\n> \n> Unless the real unstated reason is to make this easier to edit in vim\n> or something, in which case this approach seems reasonable.\n\nKeeping things aligned was the first motivation but the fact that it also\nmakes changing the action faster is also nice to have. I didn't think it\nwould help justify the patch.\nThe SHA1s not having the same length can easily be 'fixed' by setting a\nhigher value for 'core.abbrev'. \n\nThanks, \nLiam \n"}]}