{"thread":{"id":"45847","subject":"[PATCH v3 0/6] rebase -i: add config to abbreviate command-names","startedAt":"2017-05-02T04:01:23Z","lastAt":"2017-05-08T21:27:39Z","messageCount":21,"participants":["Liam Beguin","Ævar Arnfjörð Bjarmason","Johannes Schindelin","Junio C Hamano"],"isPatch":true,"patchVersion":3,"patchTotal":6},"messages":[{"id":"318461","messageId":"20170502040048.9065-1-liambeguin@gmail.com","threadId":"45847","inReplyTo":null,"subject":"[PATCH v3 0/6] rebase -i: add config to abbreviate command-names","fromName":"Liam Beguin","fromEmail":"liambeguin@gmail.com","sentAt":"2017-05-02T04:00:42Z","receivedAt":"2017-05-02T04:01:23Z","isPatch":true,"sender":{"key":"liambeguin@gmail.com","avatar":"https://avatars.githubusercontent.com/u/3811160?v=4"},"body":"Add the 'rebase.abbreviateCommands' configuration option to allow\n`git rebase -i` to default to the single-letter command-names in\nthe todo list.\n\nUsing single-letter command-names can present two benefits.\nFirst, it makes it easier to change the action since you only need to\nreplace a single character (i.e.: in vim \"r<character>\" instead of\n\"ciw<character>\").\nSecond, using this with a large enough value of 'core.abbrev' enables the\nlines of the todo list to remain aligned making the files easier to\nread.\n\nChanges from v1 to v2:\n - Improve Documentation and commit message\n\nChanges from v2 to v3:\n - Transform a single patch into a series\n - change option name from 'rebase.abbrevCmd' to 'rebase.abbreviateCommands'\n - abbreviate all commands (not just pick)\n - teach `git rebase -i --autosquash` to recognise single-letter command-names\n - move rebase configuration documentation to Documentation/rebase-config.txt\n - update Documentation to use the preferred naming for the todo list\n - update Documentation and commit messages according to feedback\n\nLiam Beguin (6):\n  rebase -i: add abbreviated command-names handling\n  rebase -i: add abbreviate_commands function\n  rebase -i: add short command-name in --autosquash\n  Documentation: move rebase.* config variables to a separate\n    rebase-config.txt\n  Documentation: use prefered name for the 'todo list' script\n  Documentation: document the rebase.abbreviateCommands option\n\n Documentation/config.txt        | 31 +-----------------------\n Documentation/git-rebase.txt    | 21 +++-------------\n Documentation/rebase-config.txt | 53 +++++++++++++++++++++++++++++++++++++++++\n git-rebase--interactive.sh      | 24 ++++++++++++++++++++----\n 4 files changed, 78 insertions(+), 52 deletions(-)\n create mode 100644 Documentation/rebase-config.txt\n\n-- \n2.9.3\n\n"},{"id":"318462","messageId":"20170502040048.9065-2-liambeguin@gmail.com","threadId":"45847","inReplyTo":"20170502040048.9065-1-liambeguin@gmail.com","subject":"[PATCH v3 1/6] rebase -i: add abbreviated command-names handling","fromName":"Liam Beguin","fromEmail":"liambeguin@gmail.com","sentAt":"2017-05-02T04:00:43Z","receivedAt":"2017-05-02T04:01:25Z","isPatch":true,"sender":{"key":"liambeguin@gmail.com","avatar":"https://avatars.githubusercontent.com/u/3811160?v=4"},"body":"make sure 'add_exec_commands' and 'transform_todo_ids' also understand\nthe abbreviated versions of the command-names.\n\nSigned-off-by: Liam Beguin <liambeguin@gmail.com>\n---\n git-rebase--interactive.sh | 4 ++--\n 1 file changed, 2 insertions(+), 2 deletions(-)\n\ndiff --git a/git-rebase--interactive.sh b/git-rebase--interactive.sh\nindex 2c9c0165b5ab..9b8a030ff045 100644\n--- a/git-rebase--interactive.sh\n+++ b/git-rebase--interactive.sh\n@@ -754,7 +754,7 @@ transform_todo_ids () {\n \twhile read -r command rest\n \tdo\n \t\tcase \"$command\" in\n-\t\t\"$comment_char\"* | exec)\n+\t\t\"$comment_char\"* |x|exec)\n \t\t\t# Be careful for oddball commands like 'exec'\n \t\t\t# that do not have a SHA-1 at the beginning of $rest.\n \t\t\t;;\n@@ -871,7 +871,7 @@ add_exec_commands () {\n \t\twhile read -r insn rest\n \t\tdo\n \t\t\tcase $insn in\n-\t\t\tpick)\n+\t\t\tp|pick)\n \t\t\t\ttest -n \"$first\" ||\n \t\t\t\tprintf \"%s\" \"$cmd\"\n \t\t\t\t;;\n-- \n2.9.3\n\n"},{"id":"318463","messageId":"20170502040048.9065-3-liambeguin@gmail.com","threadId":"45847","inReplyTo":"20170502040048.9065-1-liambeguin@gmail.com","subject":"[PATCH v3 2/6] rebase -i: add abbreviate_commands function","fromName":"Liam Beguin","fromEmail":"liambeguin@gmail.com","sentAt":"2017-05-02T04:00:44Z","receivedAt":"2017-05-02T04:01:28Z","isPatch":true,"sender":{"key":"liambeguin@gmail.com","avatar":"https://avatars.githubusercontent.com/u/3811160?v=4"},"body":"Once the rest of the processing is done, the `abbreviate_commands`\nfunction is called. If the 'rebase.abbreviateCommands' option is set to\ntrue, the function will replace each command-name by its abbreviated\nform.\n\nSigned-off-by: Liam Beguin <liambeguin@gmail.com>\n---\n git-rebase--interactive.sh | 16 ++++++++++++++++\n 1 file changed, 17 insertions(+)\n\ndiff --git a/git-rebase--interactive.sh b/git-rebase--interactive.sh\nindex 9b8a030ff045..4fa621062cdf 100644\n--- a/git-rebase--interactive.sh\n+++ b/git-rebase--interactive.sh\n@@ -884,6 +884,20 @@ add_exec_commands () {\n \tmv \"$1.new\" \"$1\"\n }\n \n+abbreviate_commands () {\n+\ttest \"$(git config --bool rebase.abbreviateCommands)\" = true || return\n+\n+\twhile read -r command rest\n+\tdo\n+\t\tcase $command in\n+\t\tx|exec) command=x ;;\n+\t\t*)      command=${command%${command#?}} ;;\n+\t\tesac\n+\t\tprintf \"%s\\n\" \"$command $rest\"\n+\tdone <\"$1\" >\"$1.new\" &&\n+\tmv -f \"$1.new\" \"$1\"\n+}\n+\n # Check if the SHA-1 passed as an argument is a\n # correct one, if not then print $2 in \"$todo\".badsha\n # $1: the SHA-1 to test\n@@ -1143,6 +1158,7 @@ edit-todo)\n \tgit stripspace --strip-comments <\"$todo\" >\"$todo\".new\n \tmv -f \"$todo\".new \"$todo\"\n \tcollapse_todo_ids\n+\tabbreviate_commands \"$todo\"\n \tappend_todo_help\n \tgettext \"\n You are editing the todo file of an ongoing interactive rebase.\n@@ -1281,6 +1297,7 @@ fi\n test -s \"$todo\" || echo noop >> \"$todo\"\n test -n \"$autosquash\" && rearrange_squash \"$todo\"\n test -n \"$cmd\" && add_exec_commands \"$todo\"\n+abbreviate_commands \"$todo\"\n \n todocount=$(git stripspace --strip-comments <\"$todo\" | wc -l)\n todocount=${todocount##* }\n-- \n2.9.3\n\n"},{"id":"318464","messageId":"20170502040048.9065-4-liambeguin@gmail.com","threadId":"45847","inReplyTo":"20170502040048.9065-1-liambeguin@gmail.com","subject":"[PATCH v3 3/6] rebase -i: add short command-name in --autosquash","fromName":"Liam Beguin","fromEmail":"liambeguin@gmail.com","sentAt":"2017-05-02T04:00:45Z","receivedAt":"2017-05-02T04:01:30Z","isPatch":true,"sender":{"key":"liambeguin@gmail.com","avatar":"https://avatars.githubusercontent.com/u/3811160?v=4"},"body":"teach `git rebase -i` to recognise short command-names when using the\n'--autosquash' option. This allows commit with titles beginning with\n\"s! ...\" and \"f! ...\" to be treated the same way as \"squash! ...\" and\n\"fixup! ...\" respectively.\n\nSigned-off-by: Liam Beguin <liambeguin@gmail.com>\n---\n Documentation/git-rebase.txt | 2 ++\n git-rebase--interactive.sh   | 4 ++--\n 2 files changed, 4 insertions(+), 2 deletions(-)\n\ndiff --git a/Documentation/git-rebase.txt b/Documentation/git-rebase.txt\nindex 53f4e144444a..3e49d8b046ca 100644\n--- a/Documentation/git-rebase.txt\n+++ b/Documentation/git-rebase.txt\n@@ -437,6 +437,8 @@ without an explicit `--interactive`.\n \tcommit from `pick` to `squash` (or `fixup`).  Ignores subsequent\n \t\"fixup! \" or \"squash! \" after the first, in case you referred to an\n \tearlier fixup/squash with `git commit --fixup/--squash`.\n+\tNote that their short counterparts, namely \"s! ...\" and \"f! ...\"\n+\tbehave the same way.\n +\n This option is only valid when the `--interactive` option is used.\n +\ndiff --git a/git-rebase--interactive.sh b/git-rebase--interactive.sh\nindex 4fa621062cdf..61450064c5c4 100644\n--- a/git-rebase--interactive.sh\n+++ b/git-rebase--interactive.sh\n@@ -790,7 +790,7 @@ rearrange_squash () {\n \tdo\n \t\ttest -z \"${format}\" || message=$(git log -n 1 --format=\"%s\" ${sha1})\n \t\tcase \"$message\" in\n-\t\t\"squash! \"*|\"fixup! \"*)\n+\t\t\"squash! \"*|\"s! \"*|\"fixup! \"*|\"f! \"*)\n \t\t\taction=\"${message%%!*}\"\n \t\t\trest=$message\n \t\t\tprefix=\n@@ -798,7 +798,7 @@ rearrange_squash () {\n \t\t\twhile :\n \t\t\tdo\n \t\t\t\tcase \"$rest\" in\n-\t\t\t\t\"squash! \"*|\"fixup! \"*)\n+\t\t\t\t\"squash! \"*|\"s! \"*|\"fixup! \"*|\"f! \"*)\n \t\t\t\t\tprefix=\"$prefix${rest%%!*},\"\n \t\t\t\t\trest=\"${rest#*! }\"\n \t\t\t\t\t;;\n-- \n2.9.3\n\n"},{"id":"318465","messageId":"20170502040048.9065-7-liambeguin@gmail.com","threadId":"45847","inReplyTo":"20170502040048.9065-1-liambeguin@gmail.com","subject":"[PATCH v3 6/6] Documentation: document the rebase.abbreviateCommands option","fromName":"Liam Beguin","fromEmail":"liambeguin@gmail.com","sentAt":"2017-05-02T04:00:48Z","receivedAt":"2017-05-02T04:01:32Z","isPatch":true,"sender":{"key":"liambeguin@gmail.com","avatar":"https://avatars.githubusercontent.com/u/3811160?v=4"},"body":"Signed-off-by: Liam Beguin <liambeguin@gmail.com>\n---\n Documentation/rebase-config.txt | 23 +++++++++++++++++++++++\n 1 file changed, 23 insertions(+)\n\ndiff --git a/Documentation/rebase-config.txt b/Documentation/rebase-config.txt\nindex a9b1d496e63a..0f29b7d0b89a 100644\n--- a/Documentation/rebase-config.txt\n+++ b/Documentation/rebase-config.txt\n@@ -28,3 +28,26 @@ rebase.instructionFormat::\n \tA format string, as specified in linkgit:git-log[1], to be used for\n \tthe todo list during an interactive rebase.  The format will automatically\n \thave the long commit hash prepended to the format.\n+\n+rebase.abbreviateCommands::\n+\tIf set to true, `git rebase -i` will abbreviate all command-names in the\n+\ttodo list resulting in something like this:\n+-------------------------------------------\n+\tp ae6c43a first commit title\n+\tf 0694310 fixup! first commit title\n+\tp bf25ea8 second commit title\n+\ts e8fbbfd squash! second commit title\n+\t...\n+-------------------------------------------\n+\tinstead of:\n+-------------------------------------------\n+\tpick ae6c43a first commit title\n+\tfixup 0694310 fixup! first commit title\n+\tpick bf25ea8 second commit title\n+\tsquash e8fbbfd squash! second commit title\n+\t...\n+-------------------------------------------\n+\tAs shown above, using single-letter command-names better aligns the\n+\ttodo list when full names have different lengths. Additionally, combined\n+\twith a large enough value of 'core.abbrev' (say 12), the todo list is\n+\tguaranteed to be fully aligned.\n-- \n2.9.3\n\n"},{"id":"318466","messageId":"20170502040048.9065-5-liambeguin@gmail.com","threadId":"45847","inReplyTo":"20170502040048.9065-1-liambeguin@gmail.com","subject":"[PATCH v3 4/6] Documentation: move rebase.* config variables to a separate rebase-config.txt","fromName":"Liam Beguin","fromEmail":"liambeguin@gmail.com","sentAt":"2017-05-02T04:00:46Z","receivedAt":"2017-05-02T04:01:35Z","isPatch":true,"sender":{"key":"liambeguin@gmail.com","avatar":"https://avatars.githubusercontent.com/u/3811160?v=4"},"body":"Move configuration variables to a separate file in order to remove\nduplicates, and include it in config.txt and git-rebase.txt.\nThe new descriptions are taken from config.txt as they are more verbose.\n\nSigned-off-by: Liam Beguin <liambeguin@gmail.com>\n---\n Documentation/config.txt        | 31 +------------------------------\n Documentation/git-rebase.txt    | 19 +------------------\n Documentation/rebase-config.txt | 30 ++++++++++++++++++++++++++++++\n 3 files changed, 32 insertions(+), 48 deletions(-)\n create mode 100644 Documentation/rebase-config.txt\n\ndiff --git a/Documentation/config.txt b/Documentation/config.txt\nindex 475e874d5155..6b647c504e8f 100644\n--- a/Documentation/config.txt\n+++ b/Documentation/config.txt\n@@ -2583,36 +2583,7 @@ push.recurseSubmodules::\n \tis retained. You may override this configuration at time of push by\n \tspecifying '--recurse-submodules=check|on-demand|no'.\n \n-rebase.stat::\n-\tWhether to show a diffstat of what changed upstream since the last\n-\trebase. False by default.\n-\n-rebase.autoSquash::\n-\tIf set to true enable `--autosquash` option by default.\n-\n-rebase.autoStash::\n-\tWhen set to true, automatically create a temporary stash\n-\tbefore the operation begins, and apply it after the operation\n-\tends.  This means that you can run rebase on a dirty worktree.\n-\tHowever, use with care: the final stash application after a\n-\tsuccessful rebase might result in non-trivial conflicts.\n-\tDefaults to false.\n-\n-rebase.missingCommitsCheck::\n-\tIf set to \"warn\", git rebase -i will print a warning if some\n-\tcommits are removed (e.g. a line was deleted), however the\n-\trebase will still proceed. If set to \"error\", it will print\n-\tthe previous warning and stop the rebase, 'git rebase\n-\t--edit-todo' can then be used to correct the error. If set to\n-\t\"ignore\", no checking is done.\n-\tTo drop a commit without warning or error, use the `drop`\n-\tcommand in the todo-list.\n-\tDefaults to \"ignore\".\n-\n-rebase.instructionFormat::\n-\tA format string, as specified in linkgit:git-log[1], to be used for\n-\tthe instruction list during an interactive rebase.  The format will automatically\n-\thave the long commit hash prepended to the format.\n+include::rebase-config.txt[]\n \n receive.advertiseAtomic::\n \tBy default, git-receive-pack will advertise the atomic push\ndiff --git a/Documentation/git-rebase.txt b/Documentation/git-rebase.txt\nindex 3e49d8b046ca..702a46adfa18 100644\n--- a/Documentation/git-rebase.txt\n+++ b/Documentation/git-rebase.txt\n@@ -203,24 +203,7 @@ Alternatively, you can undo the 'git rebase' with\n CONFIGURATION\n -------------\n \n-rebase.stat::\n-\tWhether to show a diffstat of what changed upstream since the last\n-\trebase. False by default.\n-\n-rebase.autoSquash::\n-\tIf set to true enable `--autosquash` option by default.\n-\n-rebase.autoStash::\n-\tIf set to true enable `--autostash` option by default.\n-\n-rebase.missingCommitsCheck::\n-\tIf set to \"warn\", print warnings about removed commits in\n-\tinteractive mode. If set to \"error\", print the warnings and\n-\tstop the rebase. If set to \"ignore\", no checking is\n-\tdone. \"ignore\" by default.\n-\n-rebase.instructionFormat::\n-\tCustom commit list format to use during an `--interactive` rebase.\n+include::rebase-config.txt[]\n \n OPTIONS\n -------\ndiff --git a/Documentation/rebase-config.txt b/Documentation/rebase-config.txt\nnew file mode 100644\nindex 000000000000..718721000031\n--- /dev/null\n+++ b/Documentation/rebase-config.txt\n@@ -0,0 +1,30 @@\n+rebase.stat::\n+\tWhether to show a diffstat of what changed upstream since the last\n+\trebase. False by default.\n+\n+rebase.autoSquash::\n+\tIf set to true enable `--autosquash` option by default.\n+\n+rebase.autoStash::\n+\tWhen set to true, automatically create a temporary stash\n+\tbefore the operation begins, and apply it after the operation\n+\tends.  This means that you can run rebase on a dirty worktree.\n+\tHowever, use with care: the final stash application after a\n+\tsuccessful rebase might result in non-trivial conflicts.\n+\tDefaults to false.\n+\n+rebase.missingCommitsCheck::\n+\tIf set to \"warn\", git rebase -i will print a warning if some\n+\tcommits are removed (e.g. a line was deleted), however the\n+\trebase will still proceed. If set to \"error\", it will print\n+\tthe previous warning and stop the rebase, 'git rebase\n+\t--edit-todo' can then be used to correct the error. If set to\n+\t\"ignore\", no checking is done.\n+\tTo drop a commit without warning or error, use the `drop`\n+\tcommand in the todo-list.\n+\tDefaults to \"ignore\".\n+\n+rebase.instructionFormat::\n+\tA format string, as specified in linkgit:git-log[1], to be used for\n+\tthe instruction list during an interactive rebase.  The format will automatically\n+\thave the long commit hash prepended to the format.\n-- \n2.9.3\n\n"},{"id":"318467","messageId":"20170502040048.9065-6-liambeguin@gmail.com","threadId":"45847","inReplyTo":"20170502040048.9065-1-liambeguin@gmail.com","subject":"[PATCH v3 5/6] Documentation: use preferred name for the 'todo list' script","fromName":"Liam Beguin","fromEmail":"liambeguin@gmail.com","sentAt":"2017-05-02T04:00:47Z","receivedAt":"2017-05-02T04:01:38Z","isPatch":true,"sender":{"key":"liambeguin@gmail.com","avatar":"https://avatars.githubusercontent.com/u/3811160?v=4"},"body":"Use \"todo list\" instead of \"instruction list\" or \"todo-list\" to\nreduce further confusion regarding the name of this script.\n\nSigned-off-by: Liam Beguin <liambeguin@gmail.com>\n---\n Documentation/rebase-config.txt | 4 ++--\n 1 file changed, 2 insertions(+), 2 deletions(-)\n\ndiff --git a/Documentation/rebase-config.txt b/Documentation/rebase-config.txt\nindex 718721000031..a9b1d496e63a 100644\n--- a/Documentation/rebase-config.txt\n+++ b/Documentation/rebase-config.txt\n@@ -21,10 +21,10 @@ rebase.missingCommitsCheck::\n \t--edit-todo' can then be used to correct the error. If set to\n \t\"ignore\", no checking is done.\n \tTo drop a commit without warning or error, use the `drop`\n-\tcommand in the todo-list.\n+\tcommand in the todo list.\n \tDefaults to \"ignore\".\n \n rebase.instructionFormat::\n \tA format string, as specified in linkgit:git-log[1], to be used for\n-\tthe instruction list during an interactive rebase.  The format will automatically\n+\tthe todo list during an interactive rebase.  The format will automatically\n \thave the long commit hash prepended to the format.\n-- \n2.9.3\n\n"},{"id":"318477","messageId":"CACBZZX5MacQZHVjSymWm0_RHjc_Q41J9vhqMuDGwz3L_4LjtzQ@mail.gmail.com","threadId":"45847","inReplyTo":"20170502040048.9065-1-liambeguin@gmail.com","subject":"Re: [PATCH v3 0/6] rebase -i: add config to abbreviate command-names","fromName":"Ævar Arnfjörð Bjarmason","fromEmail":"avarab@gmail.com","sentAt":"2017-05-02T08:48:41Z","receivedAt":"2017-05-02T08:49:08Z","isPatch":true,"sender":{"key":"avarab@gmail.com","avatar":"https://avatars.githubusercontent.com/u/45301?v=4"},"body":"On Tue, May 2, 2017 at 6:00 AM, Liam Beguin <liambeguin@gmail.com> wrote:\n> Add the 'rebase.abbreviateCommands' configuration option to allow\n> `git rebase -i` to default to the single-letter command-names in\n> the todo list.\n>\n> Using single-letter command-names can present two benefits.\n> First, it makes it easier to change the action since you only need to\n> replace a single character (i.e.: in vim \"r<character>\" instead of\n> \"ciw<character>\").\n> Second, using this with a large enough value of 'core.abbrev' enables the\n> lines of the todo list to remain aligned making the files easier to\n> read.\n>\n> Changes from v1 to v2:\n>  - Improve Documentation and commit message\n>\n> Changes from v2 to v3:\n>  - Transform a single patch into a series\n>  - change option name from 'rebase.abbrevCmd' to 'rebase.abbreviateCommands'\n>  - abbreviate all commands (not just pick)\n>  - teach `git rebase -i --autosquash` to recognise single-letter command-names\n>  - move rebase configuration documentation to Documentation/rebase-config.txt\n>  - update Documentation to use the preferred naming for the todo list\n>  - update Documentation and commit messages according to feedback\n>\n> Liam Beguin (6):\n>   rebase -i: add abbreviated command-names handling\n>   rebase -i: add abbreviate_commands function\n>   rebase -i: add short command-name in --autosquash\n>   Documentation: move rebase.* config variables to a separate\n>     rebase-config.txt\n>   Documentation: use prefered name for the 'todo list' script\n>   Documentation: document the rebase.abbreviateCommands option\n\nI locally rebased this into just 3 patches, i.e. in this sequence:\n\n- Documentation: move rebase.* config variables to a separate rebase-config.txt\n- Documentation: use preferred name for the 'todo list' script\n- *all the rest of this squashed*\n\nI think that's much less confusing than having 3x \"rebase -i\" patches.\nIf you look at any one of those you have very little context for\nwhat's going on, and there seems to be no point in splitting them\nsince the end result is tiny (3 files changed, 45 insertions(+), 4\ndeletions(-)).\n\nI think with that this looks good, but it also needs tests, if you\napply your series and then comment out the new calls to\nabbreviate_commands all tests still pass, if you look at git-config(1)\nand search for the other rebase.* commands & grep the test suite for\nthose you can see how they're tested for.\n\nI don't think this needs a lot of testing since it's a rather trivial\nfeature, but just one test to make sure that the todo list ends up as\n\"p ...\" \"e  ...\" instead of \"pick ...\" \"exec ...\" etc. would be good.\n\n>  Documentation/config.txt        | 31 +-----------------------\n>  Documentation/git-rebase.txt    | 21 +++-------------\n>  Documentation/rebase-config.txt | 53 +++++++++++++++++++++++++++++++++++++++++\n>  git-rebase--interactive.sh      | 24 ++++++++++++++++++++----\n>  4 files changed, 78 insertions(+), 52 deletions(-)\n>  create mode 100644 Documentation/rebase-config.txt\n>\n> --\n> 2.9.3\n>\n"},{"id":"318503","messageId":"alpine.DEB.2.20.1705021634210.3480@virtualbox","threadId":"45847","inReplyTo":"20170502040048.9065-2-liambeguin@gmail.com","subject":"Re: [PATCH v3 1/6] rebase -i: add abbreviated command-names handling","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2017-05-02T14:37:05Z","receivedAt":"2017-05-02T14:37:30Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi Liam,\n\n\nOn Tue, 2 May 2017, Liam Beguin wrote:\n\n> diff --git a/git-rebase--interactive.sh b/git-rebase--interactive.sh\n> index 2c9c0165b5ab..9b8a030ff045 100644\n> --- a/git-rebase--interactive.sh\n> +++ b/git-rebase--interactive.sh\n> @@ -754,7 +754,7 @@ transform_todo_ids () {\n>  \twhile read -r command rest\n>  \tdo\n>  \t\tcase \"$command\" in\n> -\t\t\"$comment_char\"* | exec)\n> +\t\t\"$comment_char\"* |x|exec)\n\nWhile the existing line has spaces around the pipe symbol, I think you can\nsafely remove them in this patch, as the style of the remainder of the\nscript seems to be disagreeing with that style. But please remove also the\nspace between the `*` and the `|`.\n\nThe functional part of the patch is correct, as far as I can see.\n\nCiao,\nJohannes\n"},{"id":"318504","messageId":"alpine.DEB.2.20.1705021641240.3480@virtualbox","threadId":"45847","inReplyTo":"20170502040048.9065-3-liambeguin@gmail.com","subject":"Re: [PATCH v3 2/6] rebase -i: add abbreviate_commands function","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2017-05-02T15:32:04Z","receivedAt":"2017-05-02T15:32:21Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi Liam,\n\nOn Tue, 2 May 2017, Liam Beguin wrote:\n\n> diff --git a/git-rebase--interactive.sh b/git-rebase--interactive.sh\n> index 9b8a030ff045..4fa621062cdf 100644\n> --- a/git-rebase--interactive.sh\n> +++ b/git-rebase--interactive.sh\n> @@ -884,6 +884,20 @@ add_exec_commands () {\n>  \tmv \"$1.new\" \"$1\"\n>  }\n>  \n> +abbreviate_commands () {\n> +\ttest \"$(git config --bool rebase.abbreviateCommands)\" = true || return\n> +\n> +\twhile read -r command rest\n> +\tdo\n> +\t\tcase $command in\n> +\t\tx|exec) command=x ;;\n> +\t\t*)      command=${command%${command#?}} ;;\n> +\t\tesac\n> +\t\tprintf \"%s\\n\" \"$command $rest\"\n> +\tdone <\"$1\" >\"$1.new\" &&\n> +\tmv -f \"$1.new\" \"$1\"\n> +}\n\nNeither this function nor its callers handle errors, but that is in line\nwith how the other todo list-munging functions work.\n\nI just say this to document that I read this code, noted this shortcoming,\nand think that it is okay to keep it this way for the moment.\n\nThere is one more fundamental comment I have, though: we already have a\nstep that converts the todo list to/from the human readable format (by\ncollapsing/expanding the commit hashes presented in the list). We could\neasily make this conversion a part of that conversion.\n\nOnce my `rebase-i-extra` patches get accepted, we will need to rewrite\nthis in C, as part of sequencer.c, anyway. It will look somewhat like\nthis:\n\n-- snipsnap --\ndiff --git a/builtin/rebase--helper.c b/builtin/rebase--helper.c\nindex e6591f01112..5eda71307af 100644\n--- a/builtin/rebase--helper.c\n+++ b/builtin/rebase--helper.c\n@@ -11,7 +11,7 @@ static const char * const builtin_rebase_helper_usage[] = {\n int cmd_rebase__helper(int argc, const char **argv, const char *prefix)\n {\n \tstruct replay_opts opts = REPLAY_OPTS_INIT;\n-\tint keep_empty = 0;\n+\tint keep_empty = 0, abbreviate_commands = 0;\n \tenum {\n \t\tCONTINUE = 1, ABORT, MAKE_SCRIPT, SHORTEN_SHA1S, EXPAND_SHA1S,\n \t\tCHECK_TODO_LIST, SKIP_UNNECESSARY_PICKS, REARRANGE_SQUASH\n@@ -39,6 +39,7 @@ int cmd_rebase__helper(int argc, const char **argv, const char *prefix)\n \t};\n \n \tgit_config(git_default_config, NULL);\n+\tgit_config_get_bool(\"rebase.abbreviatecommands\", &abbreviate_commands);\n \n \topts.action = REPLAY_INTERACTIVE_REBASE;\n \topts.allow_ff = 1;\n@@ -52,11 +53,12 @@ int cmd_rebase__helper(int argc, const char **argv, const char *prefix)\n \tif (command == ABORT && argc == 1)\n \t\treturn !!sequencer_remove_state(&opts);\n \tif (command == MAKE_SCRIPT && argc > 1)\n-\t\treturn !!sequencer_make_script(keep_empty, stdout, argc, argv);\n+\t\treturn !!sequencer_make_script(keep_empty, abbreviate_commands,\n+\t\t\t\t\t       stdout, argc, argv);\n \tif (command == SHORTEN_SHA1S && argc == 1)\n-\t\treturn !!transform_todo_ids(1);\n+\t\treturn !!transform_todo_ids(1, abbreviate_commands);\n \tif (command == EXPAND_SHA1S && argc == 1)\n-\t\treturn !!transform_todo_ids(0);\n+\t\treturn !!transform_todo_ids(0, 0);\n \tif (command == CHECK_TODO_LIST && argc == 1)\n \t\treturn !!check_todo_list();\n \tif (command == SKIP_UNNECESSARY_PICKS && argc == 1)\ndiff --git a/sequencer.c b/sequencer.c\nindex 63a588f0916..ca504063d16 100644\n--- a/sequencer.c\n+++ b/sequencer.c\n@@ -2390,7 +2390,7 @@ void append_signoff(struct strbuf *msgbuf, int ignore_footer, unsigned flag)\n \tstrbuf_release(&sob);\n }\n \n-int sequencer_make_script(int keep_empty, FILE *out,\n+int sequencer_make_script(int keep_empty, int abbreviate_commands, FILE *out,\n \t\tint argc, const char **argv)\n {\n \tchar *format = NULL;\n@@ -2430,7 +2430,9 @@ int sequencer_make_script(int keep_empty, FILE *out,\n \t\tstrbuf_reset(&buf);\n \t\tif (!keep_empty && is_original_commit_empty(commit))\n \t\t\tstrbuf_addf(&buf, \"%c \", comment_line_char);\n-\t\tstrbuf_addf(&buf, \"pick %s \", oid_to_hex(&commit->object.oid));\n+\t\tstrbuf_addf(&buf, \"%s %s \",\n+\t\t\t    abbreviate_commands ? \"p\" : \"pick\",\n+\t\t\t    oid_to_hex(&commit->object.oid));\n \t\tpretty_print_commit(&pp, commit, &buf);\n \t\tstrbuf_addch(&buf, '\\n');\n \t\tfputs(buf.buf, out);\n@@ -2440,7 +2442,7 @@ int sequencer_make_script(int keep_empty, FILE *out,\n }\n \n \n-int transform_todo_ids(int shorten_sha1s)\n+int transform_todo_ids(int shorten_sha1s, int abbreviate_commands)\n {\n \tconst char *todo_file = rebase_path_todo();\n \tstruct todo_list todo_list = TODO_LIST_INIT;\n@@ -2476,16 +2478,31 @@ int transform_todo_ids(int shorten_sha1s)\n \t\t\ttodo_list.items[i + 1].offset_in_buf :\n \t\t\ttodo_list.buf.len;\n \n-\t\tif (item->command >= TODO_EXEC && item->command != TODO_DROP)\n-\t\t\tfwrite(p, eol - bol, 1, out);\n+\t\tif (item->command >= TODO_EXEC && item->command != TODO_DROP) {\n+\t\t\tif (!abbreviate_commands)\n+\t\t\t\tfwrite(p, eol - bol, 1, out);\n+\t\t\telse {\n+\t\t\t\tconst char *end_of_line = p + eol;\n+\t\t\t\tp += strspn(p, \" \\t\"); /* skip whitespace */\n+\t\t\t\tp += strcspn(p, \" \\t\"); /* skip command */\n+\t\t\t\tfprintf(out, \"%c%.*s\",\n+\t\t\t\t\ttodo_command_info[item->command].c,\n+\t\t\t\t\t(int)(end_of_line - p), p);\n+\t\t\t}\n+\t\t}\n \t\telse {\n \t\t\tconst char *sha1 = shorten_sha1s ?\n \t\t\t\tshort_commit_name(item->commit) :\n \t\t\t\toid_to_hex(&item->commit->object.oid);\n \t\t\tint len;\n \n-\t\t\tp += strspn(p, \" \\t\"); /* left-trim command */\n-\t\t\tlen = strcspn(p, \" \\t\"); /* length of command */\n+\t\t\tif (abbreviate_commands) {\n+\t\t\t\tp = &todo_command_info[item->command].c;\n+\t\t\t\tlen = 1;\n+\t\t\t} else {\n+\t\t\t\tp += strspn(p, \" \\t\"); /* left-trim command */\n+\t\t\t\tlen = strcspn(p, \" \\t\"); /* length of command */\n+\t\t\t}\n \n \t\t\tfprintf(out, \"%.*s %s %.*s\\n\",\n \t\t\t\tlen, p, sha1, item->arg_len, item->arg);\ndiff --git a/sequencer.h b/sequencer.h\nindex 1c94bec7622..9a7f4333900 100644\n--- a/sequencer.h\n+++ b/sequencer.h\n@@ -45,10 +45,10 @@ int sequencer_continue(struct replay_opts *opts);\n int sequencer_rollback(struct replay_opts *opts);\n int sequencer_remove_state(struct replay_opts *opts);\n \n-int sequencer_make_script(int keep_empty, FILE *out,\n+int sequencer_make_script(int keep_empty, int abbreviate_commands, FILE *out,\n \t\tint argc, const char **argv);\n \n-int transform_todo_ids(int shorten_sha1s);\n+int transform_todo_ids(int shorten_sha1s, int abbreviate_commands);\n int check_todo_list(void);\n int skip_unnecessary_picks(void);\n int rearrange_squash(void);\n"},{"id":"318505","messageId":"alpine.DEB.2.20.1705021732570.3480@virtualbox","threadId":"45847","inReplyTo":"20170502040048.9065-4-liambeguin@gmail.com","subject":"Re: [PATCH v3 3/6] rebase -i: add short command-name in --autosquash","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2017-05-02T15:34:57Z","receivedAt":"2017-05-02T15:35:11Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi Liam,\n\nOn Tue, 2 May 2017, Liam Beguin wrote:\n\n> teach `git rebase -i` to recognise short command-names when using the\n> '--autosquash' option. This allows commit with titles beginning with\n> \"s! ...\" and \"f! ...\" to be treated the same way as \"squash! ...\" and\n> \"fixup! ...\" respectively.\n\nAs the recommended way to generate those commits is by using the\n--fixup/--squash options of git-commit, and as there is *a much higher*\nchance of false positives when using a very short tell-tale such as `f!`\n(which could be an abbreviation for an expletive, likewise `s!`), I do not\nthink we will want this change.\n\nLet's keep handling just fixup!/squash!\n\nCiao,\nJohannes\n"},{"id":"318507","messageId":"alpine.DEB.2.20.1705021736470.3480@virtualbox","threadId":"45847","inReplyTo":"20170502040048.9065-5-liambeguin@gmail.com","subject":"Re: [PATCH v3 4/6] Documentation: move rebase.* config variables to a separate rebase-config.txt","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2017-05-02T15:40:07Z","receivedAt":"2017-05-02T15:40:24Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi Liam,\n\n\nOn Tue, 2 May 2017, Liam Beguin wrote:\n\n> Move configuration variables to a separate file in order to remove\n> duplicates, and include it in config.txt and git-rebase.txt.\n> The new descriptions are taken from config.txt as they are more verbose.\n\nThis is a nice cleanup in its own right. My only complaint: the\nrebase.autoStash documentation no longer says that it is related to the\ncommand-line option `--autosquash`.\n\nWhile the original description in `git-rebase.txt` was suboptimal, maybe\nwe can add back the reference by adding something like:\n\n\tThis option can be overridden by the `--no-autosquash` and\n\t`--autosquash` options of linkgit:git-rebase[1].\n\nCiao,\nJohannes\n"},{"id":"318508","messageId":"alpine.DEB.2.20.1705021740530.3480@virtualbox","threadId":"45847","inReplyTo":"CACBZZX5MacQZHVjSymWm0_RHjc_Q41J9vhqMuDGwz3L_4LjtzQ@mail.gmail.com","subject":"Re: [PATCH v3 0/6] rebase -i: add config to abbreviate command-names","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2017-05-02T15:41:32Z","receivedAt":"2017-05-02T15:42:00Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\n\nOn Tue, 2 May 2017, Ævar Arnfjörð Bjarmason wrote:\n\n> I locally rebased this into just 3 patches, i.e. in this sequence:\n> \n> - Documentation: move rebase.* config variables to a separate rebase-config.txt\n> - Documentation: use preferred name for the 'todo list' script\n> - *all the rest of this squashed*\n\nI think that makes a lot of sense. (I would drop the part about f!/s!, as\nI pointed out, though)\n\nCiao,\nJohannes"},{"id":"318509","messageId":"alpine.DEB.2.20.1705021741580.3480@virtualbox","threadId":"45847","inReplyTo":"20170502040048.9065-1-liambeguin@gmail.com","subject":"Re: [PATCH v3 0/6] rebase -i: add config to abbreviate command-names","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2017-05-02T15:48:13Z","receivedAt":"2017-05-02T15:48:24Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi Liam,\n\nOn Tue, 2 May 2017, Liam Beguin wrote:\n\n> Add the 'rebase.abbreviateCommands' configuration option to allow `git\n> rebase -i` to default to the single-letter command-names in the todo\n> list.\n> \n> Using single-letter command-names can present two benefits.  First, it\n> makes it easier to change the action since you only need to replace a\n> single character (i.e.: in vim \"r<character>\" instead of\n> \"ciw<character>\").  Second, using this with a large enough value of\n> 'core.abbrev' enables the lines of the todo list to remain aligned\n> making the files easier to read.\n> \n> Changes from v1 to v2:\n>  - Improve Documentation and commit message\n> \n> Changes from v2 to v3:\n>  - Transform a single patch into a series\n>  - change option name from 'rebase.abbrevCmd' to 'rebase.abbreviateCommands'\n>  - abbreviate all commands (not just pick)\n>  - teach `git rebase -i --autosquash` to recognise single-letter command-names\n>  - move rebase configuration documentation to Documentation/rebase-config.txt\n>  - update Documentation to use the preferred naming for the todo list\n>  - update Documentation and commit messages according to feedback\n\nThank you for this pleasant read. It is an excellent contribution, and the\nway you communicate what you changed and why is very welcome.\n\nI offered a couple of comments, my biggest one probably being that this\npatch series is crossing paths with my patch series that tries to move\nmore functionality out of the git-rebase--interactive.sh script into the\ngit-rebase--helper that is written in C, closely followed by my suggestion\nto fold at least part of the functionality into the SHA-1\ncollapsing/expanding.\n\nIf your patch series \"wins\", I can easily forward-port your changes to the\nrebase-i-extra branch, but it may actually make sense to build on top of\nthe rebase-i-extra branch to begin with. If you agree: I pushed the\nproposed change to the `rebase-i-extra+abbrev` branch at\nhttps://github.com/dscho/git.\n\nI look forward to see this story unfold!\n\nCiao,\nJohannes\n"},{"id":"318595","messageId":"1493767094.29673.37.camel@gmail.com","threadId":"45847","inReplyTo":"alpine.DEB.2.20.1705021732570.3480@virtualbox","subject":"Re: [PATCH v3 3/6] rebase -i: add short command-name in --autosquash","fromName":"Liam Beguin","fromEmail":"liambeguin@gmail.com","sentAt":"2017-05-02T23:18:14Z","receivedAt":"2017-05-02T23:18:33Z","isPatch":true,"sender":{"key":"liambeguin@gmail.com","avatar":"https://avatars.githubusercontent.com/u/3811160?v=4"},"body":"Hi Johannes,\n\nOn Tue, 2017-05-02 at 17:34 +0200, Johannes Schindelin wrote:\n> Hi Liam,\n> \n> On Tue, 2 May 2017, Liam Beguin wrote:\n> \n> > teach `git rebase -i` to recognise short command-names when using the\n> > '--autosquash' option. This allows commit with titles beginning with\n> > \"s! ...\" and \"f! ...\" to be treated the same way as \"squash! ...\" and\n> > \"fixup! ...\" respectively.\n> \n> As the recommended way to generate those commits is by using the\n> --fixup/--squash options of git-commit, and as there is *a much higher*\n> chance of false positives when using a very short tell-tale such as `f!`\n> (which could be an abbreviation for an expletive, likewise `s!`), I do not\n> think we will want this change.\n> \n> Let's keep handling just fixup!/squash!\n> \n> Ciao,\n> Johannes\n\nI was not quite sure about this change. My guess was that since --autosquash\nneeds the whole commit title to find a match, the short version had little\nprobability of generating a false positive. I thought it made sense to include\nthe change in this series, but I understand why it's probably not a good idea\nto take it. I'll remove it in the next series.\n\nThanks, \nLiam\n"},{"id":"318596","messageId":"1493769381.29673.39.camel@gmail.com","threadId":"45847","inReplyTo":"alpine.DEB.2.20.1705021741580.3480@virtualbox","subject":"Re: [PATCH v3 0/6] rebase -i: add config to abbreviate command-names","fromName":"Liam Beguin","fromEmail":"liambeguin@gmail.com","sentAt":"2017-05-02T23:56:21Z","receivedAt":"2017-05-02T23:56:37Z","isPatch":true,"sender":{"key":"liambeguin@gmail.com","avatar":"https://avatars.githubusercontent.com/u/3811160?v=4"},"body":"Hi Johannes, \n\nOn Tue, 2017-05-02 at 17:48 +0200, Johannes Schindelin wrote:\n> Hi Liam,\n> \n> On Tue, 2 May 2017, Liam Beguin wrote:\n> \n> > Add the 'rebase.abbreviateCommands' configuration option to allow `git\n> > rebase -i` to default to the single-letter command-names in the todo\n> > list.\n> > \n> > Using single-letter command-names can present two benefits.  First, it\n> > makes it easier to change the action since you only need to replace a\n> > single character (i.e.: in vim \"r<character>\" instead of\n> > \"ciw<character>\").  Second, using this with a large enough value of\n> > 'core.abbrev' enables the lines of the todo list to remain aligned\n> > making the files easier to read.\n> > \n> > Changes from v1 to v2:\n> >  - Improve Documentation and commit message\n> > \n> > Changes from v2 to v3:\n> >  - Transform a single patch into a series\n> >  - change option name from 'rebase.abbrevCmd' to 'rebase.abbreviateCommands'\n> >  - abbreviate all commands (not just pick)\n> >  - teach `git rebase -i --autosquash` to recognise single-letter command-names\n> >  - move rebase configuration documentation to Documentation/rebase-config.txt\n> >  - update Documentation to use the preferred naming for the todo list\n> >  - update Documentation and commit messages according to feedback\n> \n> Thank you for this pleasant read. It is an excellent contribution, and the\n> way you communicate what you changed and why is very welcome.\n> \n\nThanks! and thank you for the support and help.\n\n> I offered a couple of comments, my biggest one probably being that this\n> patch series is crossing paths with my patch series that tries to move\n> more functionality out of the git-rebase--interactive.sh script into the\n> git-rebase--helper that is written in C, closely followed by my suggestion\n> to fold at least part of the functionality into the SHA-1\n> collapsing/expanding.\n> \n\nI've seen a few messages about this migration, but I'm not yet sure I understand\nthe difference between the shell and the C implementations. Is the C version going\nto replace 'git-rebase--interactive.sh'?\n\n> If your patch series \"wins\", I can easily forward-port your changes to the\n> rebase-i-extra branch, but it may actually make sense to build on top of\n> the rebase-i-extra branch to begin with. If you agree: I pushed the\n> proposed change to the `rebase-i-extra+abbrev` branch at\n> https://github.com/dscho/git.\n> \n\nIf 'git-rebase--interactive.sh' is bound to be replaced, I could\njust shrink this to the Documentation cleanup (patches 4 and 5)\nand rework the rest on top of your new implementation.\n\n> I look forward to see this story unfold!\n> \n> Ciao,\n> Johannes\n\nThanks, \nLiam\n"},{"id":"318644","messageId":"alpine.DEB.2.20.1705031315460.3480@virtualbox","threadId":"45847","inReplyTo":"1493769381.29673.39.camel@gmail.com","subject":"Re: [PATCH v3 0/6] rebase -i: add config to abbreviate command-names","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2017-05-03T11:22:03Z","receivedAt":"2017-05-03T11:22:23Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi Liam,\n\nOn Tue, 2 May 2017, Liam Beguin wrote:\n\n> On Tue, 2017-05-02 at 17:48 +0200, Johannes Schindelin wrote:\n> \n> > I offered a couple of comments, my biggest one probably being that\n> > this patch series is crossing paths with my patch series that tries to\n> > move more functionality out of the git-rebase--interactive.sh script\n> > into the git-rebase--helper that is written in C, closely followed by\n> > my suggestion to fold at least part of the functionality into the\n> > SHA-1 collapsing/expanding.\n> \n> I've seen a few messages about this migration, but I'm not yet sure I\n> understand the difference between the shell and the C implementations.\n> Is the C version going to replace 'git-rebase--interactive.sh'?\n\nThe C version has already started to replace the shell script, yes. In\nadding and using git-rebase--helper, there are already parts of the\ninteractive rebase functionality that are run using C code only. The idea\nis to move more and more functionality over (separating out the\n--preserve-merges handling into a different shell script, as I have no\nplans to convert that code to C, and as far as I can see nobody else wants\nto step up to that task, either). Eventually, we may be able to finish\nthat gigantic task of having git-rebase be all builtin C code.\n\n> > If your patch series \"wins\", I can easily forward-port your changes to\n> > the rebase-i-extra branch, but it may actually make sense to build on\n> > top of the rebase-i-extra branch to begin with. If you agree: I pushed\n> > the proposed change to the `rebase-i-extra+abbrev` branch at\n> > https://github.com/dscho/git.\n> \n> If 'git-rebase--interactive.sh' is bound to be replaced, I could\n> just shrink this to the Documentation cleanup (patches 4 and 5)\n> and rework the rest on top of your new implementation.\n\nI kind of hoped that Junio would chime in with his verdict. That would be\nthe ultimate deciding factor, I think.\n\nCiao,\nJohannes\n"},{"id":"318722","messageId":"xmqqwp9x9prp.fsf@gitster.mtv.corp.google.com","threadId":"45847","inReplyTo":"alpine.DEB.2.20.1705031315460.3480@virtualbox","subject":"Re: [PATCH v3 0/6] rebase -i: add config to abbreviate command-names","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2017-05-04T05:04:10Z","receivedAt":"2017-05-04T05:04:17Z","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>> If 'git-rebase--interactive.sh' is bound to be replaced, I could\n>> just shrink this to the Documentation cleanup (patches 4 and 5)\n>> and rework the rest on top of your new implementation.\n>\n> I kind of hoped that Junio would chime in with his verdict. That would be\n> the ultimate deciding factor, I think.\n\nWhat I can predict is that within two or three release cycles\n(unless you completely lose interest) the todo-list generation will\nbe all in C and that I anticipate that the C version may even be\ncapable of generating different kind of todo command (e.g. to\nsupport tools like your Garden Shears more natively), so the\nmid-term direction definitely is that any enhancement would in the\nend needs to happen on top of or in coordination with the C rewrite\nwe've been discussing recently.\n\nI didn't know what the comfort levels of Liam working with scripted\nvs C code, and the \"vertict\" depends on that, I would think.  We may\nwant to discuss the enhancement in the original scripted form Liam\ndid with new tests while the C rewrite is still cooking, and either\nLiam, you or somebody else can make it work with your C rewrite when\nboth are ready.  If Liam feels comfortable working with you and the\ncode after the C rewrite that is still in-flight, it is also fine if\nthe next iteration from Liam were on top of your series.\n\n\n"},{"id":"319021","messageId":"1494177195.32697.2.camel@gmail.com","threadId":"45847","inReplyTo":"xmqqwp9x9prp.fsf@gitster.mtv.corp.google.com","subject":"Re: [PATCH v3 0/6] rebase -i: add config to abbreviate command-names","fromName":"Liam Beguin","fromEmail":"liambeguin@gmail.com","sentAt":"2017-05-07T17:13:15Z","receivedAt":"2017-05-07T22:38:33Z","isPatch":true,"sender":{"key":"liambeguin@gmail.com","avatar":"https://avatars.githubusercontent.com/u/3811160?v=4"},"body":"Hi Junio,\n\nOn Wed, 2017-05-03 at 22:04 -0700, Junio C Hamano wrote:\n> Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:\n> \n> > > If 'git-rebase--interactive.sh' is bound to be replaced, I could\n> > > just shrink this to the Documentation cleanup (patches 4 and 5)\n> > > and rework the rest on top of your new implementation.\n> > \n> > I kind of hoped that Junio would chime in with his verdict. That would be\n> > the ultimate deciding factor, I think.\n> \n> What I can predict is that within two or three release cycles\n> (unless you completely lose interest) the todo-list generation will\n> be all in C and that I anticipate that the C version may even be\n> capable of generating different kind of todo command (e.g. to\n> support tools like your Garden Shears more natively), so the\n> mid-term direction definitely is that any enhancement would in the\n> end needs to happen on top of or in coordination with the C rewrite\n> we've been discussing recently.\n> \n> I didn't know what the comfort levels of Liam working with scripted\n> vs C code, and the \"vertict\" depends on that, I would think.  We may\n> want to discuss the enhancement in the original scripted form Liam\n> did with new tests while the C rewrite is still cooking, and either\n> Liam, you or somebody else can make it work with your C rewrite when\n> both are ready.  If Liam feels comfortable working with you and the\n> code after the C rewrite that is still in-flight, it is also fine if\n> the next iteration from Liam were on top of your series.\n> \n> \n\nSorry for the delay, I don't mind switching to C but it would probably\nbe easier to see if the scripted version gets approved first.\nIf it does, I could then get started on the C implementation.\nIf you prefer I could also forget about the scripted version, make a C\nimplementation work and see if that gets approved.\n\nThanks,\nLiam\n"},{"id":"319027","messageId":"xmqqo9v4chv4.fsf@gitster.mtv.corp.google.com","threadId":"45847","inReplyTo":"1494177195.32697.2.camel@gmail.com","subject":"Re: [PATCH v3 0/6] rebase -i: add config to abbreviate command-names","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2017-05-08T00:27:59Z","receivedAt":"2017-05-08T00:28:06Z","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> Sorry for the delay, I don't mind switching to C but it would probably\n> be easier to see if the scripted version gets approved first.\n> If it does, I could then get started on the C implementation.\n> If you prefer I could also forget about the scripted version, make a C\n> implementation work and see if that gets approved.\n\nI am not sure what \"approved\" would mean in the context of this\nproject, though ;-) Your patch to the scripted version would\ncertainly not be in the upcoming release.  If you define the\n\"approval\" as \"it is queued to my tree somewhere\", the patch would\nstart its life like everybody else by getting merged to the 'pu'\nbranch, where there already is a topic that removes the code you\npatch your enhancement into.\n\nThe list _can_ agree that it is a good idea to have an option to\npopulate the todo list with shortened insn words from the beginning\n(instead of merely accepting a short-hand while executing), which is\nwhat your patch wants to do, without actually having the updated\nscripted \"rebase -i\" merged in any of the integration branches in my\ntree.  If you meant by \"approval\" to have such a list concensus, I\nthink you may already have one.  I personally do not think it is a\ngreat idea but I do not think it is a horrible one, either.  As long\nas it is an opt-in feature that many people find useful (which may\nbe the case already, judging from the list traffic), I do not mind\n;-)\n\n\n\n"},{"id":"319119","messageId":"1494278850.32697.4.camel@gmail.com","threadId":"45847","inReplyTo":"xmqqo9v4chv4.fsf@gitster.mtv.corp.google.com","subject":"Re: [PATCH v3 0/6] rebase -i: add config to abbreviate command-names","fromName":"Liam Beguin","fromEmail":"liambeguin@gmail.com","sentAt":"2017-05-08T21:27:30Z","receivedAt":"2017-05-08T21:27:39Z","isPatch":true,"sender":{"key":"liambeguin@gmail.com","avatar":"https://avatars.githubusercontent.com/u/3811160?v=4"},"body":"Hi,\n\nOn Mon, 2017-05-08 at 09:27 +0900, Junio C Hamano wrote:\n> Liam Beguin <liambeguin@gmail.com> writes:\n> \n> > Sorry for the delay, I don't mind switching to C but it would probably\n> > be easier to see if the scripted version gets approved first.\n> > If it does, I could then get started on the C implementation.\n> > If you prefer I could also forget about the scripted version, make a C\n> > implementation work and see if that gets approved.\n> \n> I am not sure what \"approved\" would mean in the context of this\n> project, though ;-) Your patch to the scripted version would\n> certainly not be in the upcoming release.  If you define the\n> \"approval\" as \"it is queued to my tree somewhere\", the patch would\n> start its life like everybody else by getting merged to the 'pu'\n> branch, where there already is a topic that removes the code you\n> patch your enhancement into.\n> \n\nBy \"approved\", I guess I meant the list reaches an agreement. \n\n> The list _can_ agree that it is a good idea to have an option to\n> populate the todo list with shortened insn words from the beginning\n> (instead of merely accepting a short-hand while executing), which is\n> what your patch wants to do, without actually having the updated\n> scripted \"rebase -i\" merged in any of the integration branches in my\n> tree.  If you meant by \"approval\" to have such a list concensus, I\n> think you may already have one.  I personally do not think it is a\n> great idea but I do not think it is a horrible one, either.  As long\n> as it is an opt-in feature that many people find useful (which may\n> be the case already, judging from the list traffic), I do not mind\n> ;-)\n> \n\nOk, based on this, I'll send a new series based on the 'pu' branch.\n\nThanks again, \nLiam\n"}]}