{"thread":{"id":"21884","subject":"[PATCHv2 0/2] Add a \"fixup\" command to \"rebase --interactive\"","startedAt":"2009-12-07T04:22:57Z","lastAt":"2009-12-08T09:25:28Z","messageCount":13,"participants":["Michael Haggerty","Junio C Hamano","Johannes Schindelin","Sverre Rabbelier","Matthieu Moy"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"129374","messageId":"cover.1260099005.git.mhagger@alum.mit.edu","threadId":"21884","inReplyTo":null,"subject":"[PATCHv2 0/2] Add a \"fixup\" command to \"rebase --interactive\"","fromName":"Michael Haggerty","fromEmail":"mhagger@alum.mit.edu","sentAt":"2009-12-07T04:22:57Z","receivedAt":"2009-12-07T04:22:57Z","isPatch":false,"sender":{"key":"mhagger@alum.mit.edu","avatar":"https://avatars.githubusercontent.com/u/119718?v=4"},"body":"Thanks, everybody, for all of the feedback.  This is the redone patch\nseries, which I think addresses all of your suggestions.\n\nI would still like to implement \"don't open the editor if there are\nonly fixups\", but if it's OK I'll work on that in a separate patch\nseries when I have time.\n\nMichael J Gruber wrote:\n> My first reaction to the subject was \"Huh? What repository?\". So I\n> suggest something like\n> \n> t3404: Better document the original repository layout\n> \n> as a more descriptive subject.\n\nGood idea.  Done.\n\nJohannes Schindelin wrote:\n> Alternatively, one could use the test_commit function, I guess. [...]\n\nYes, that's much easier.  Changed.  This makes the old first and\nsecond patches reduce to a single one.\n\nJohannes Schindelin wrote:\n> On Fri, 4 Dec 2009, Junio C Hamano wrote:\n>> Michael Haggerty <mhagger@alum.mit.edu> writes:\n>>\n>>> diff --git a/git-rebase--interactive.sh b/git-rebase--interactive.sh\n>>> index 0bd3bf7..539413d 100755\n>>> --- a/git-rebase--interactive.sh\n>>> +++ b/git-rebase--interactive.sh\n>>> @@ -302,7 +302,7 @@ nth_string () {\n>>>  \n>>>  make_squash_message () {\n>>>  \tif test -f \"$SQUASH_MSG\"; then\n>>> -\t\tCOUNT=$(($(sed -n \"s/^# This is [^0-9]*\\([1-9][0-9]*\\).*/\\1/p\" \\\n>>> +\t\tCOUNT=$(($(sed -n \"s/^# Th[^0-9]*\\([1-9][0-9]*\\)\\(th\\|st\\|nd\\|rd\\) commit message.*:/\\1/p\" \\\n>>>  \t\t\t< \"$SQUASH_MSG\" | sed -ne '$p')+1))\n>> This sed replacement worries me.  I don't have a time to check myself\n>> today but do we use \\(this\\|or\\|that\\) alternates with our sed script\n>> already elsewhere in the codebase (test scripts do not count)?\n>>\n>> Otherwise this may suddenly be breaking a platform that has an\n>> implementation of sed that may be substandard but so far has been\n>> sufficient to work with git.\n> \n> IIRC \"|\" was not correctly handled by BSD sed (used e.g. in MacOSX).\n> \n> So maybe it would be best to just look for \"commit message\"?  I agree with\n> Michael that the regex should not be too loose.\n\nThanks for pointing this out.  I replaced the problematic part of the\nregexp with \"[snrt][tdh]\", which isn't quite so selective but should\nbe portable.  (This is the same fix that Junio suggested.)\n\nBjÃ¶rn Gustavsson wrote:\n> On Fri, Dec 4, 2009 at 3:36 PM, Michael Haggerty <mhagger@alum.mit.edu> wrote:\n> Nitpick: the recommended style is to leave out the full stop\n> at the end of the first line of the commit message.\n\nNit picked.\n\nJunio C Hamano wrote:\n> IIRC, the end result of the bikeshedding for the name of the command was\n> won by Dscho's \"fixup\":\n> \n>   http://thread.gmane.org/gmane.comp.version-control.git/127923/focus=121820\n\nThat's fine with me (the abbreviation is even the same :-) ).\nChanged.\n\nMichael\n\nMichael Haggerty (2):\n  t3404: Use test_commit to set up test repository\n  Add a command \"fixup\" to rebase --interactive\n\n Documentation/git-rebase.txt  |   13 +++--\n git-rebase--interactive.sh    |   51 +++++++++++++++++----\n t/lib-rebase.sh               |    7 ++-\n t/t3404-rebase-interactive.sh |   96 +++++++++++++++++++++-------------------\n 4 files changed, 103 insertions(+), 64 deletions(-)\n"},{"id":"129376","messageId":"1b82a55c2a45b8f40ac0fe42d4ce2a55e72a2557.1260099005.git.mhagger@alum.mit.edu","threadId":"21884","inReplyTo":"cover.1260099005.git.mhagger@alum.mit.edu","subject":"[PATCHv2 1/2] t3404: Use test_commit to set up test repository","fromName":"Michael Haggerty","fromEmail":"mhagger@alum.mit.edu","sentAt":"2009-12-07T04:22:58Z","receivedAt":"2009-12-07T04:22:58Z","isPatch":false,"sender":{"key":"mhagger@alum.mit.edu","avatar":"https://avatars.githubusercontent.com/u/119718?v=4"},"body":"Also adjust \"expected\" text to reflect the file contents generated by\ntest_commit, which are slightly different than those generated by the\nold code.\n\nSigned-off-by: Michael Haggerty <mhagger@alum.mit.edu>\n---\n t/t3404-rebase-interactive.sh |   66 ++++++++++++----------------------------\n 1 files changed, 20 insertions(+), 46 deletions(-)\n\ndiff --git a/t/t3404-rebase-interactive.sh b/t/t3404-rebase-interactive.sh\nindex 3a37793..778daf4 100755\n--- a/t/t3404-rebase-interactive.sh\n+++ b/t/t3404-rebase-interactive.sh\n@@ -16,53 +16,26 @@ set_fake_editor\n \n # set up two branches like this:\n #\n-# A - B - C - D - E\n+# A - B - C - D - E     (master)\n #   \\\n-#     F - G - H\n+#     F - G - H         (branch1)\n #       \\\n-#         I\n+#         I             (branch2)\n #\n-# where B, D and G touch the same file.\n+# where A, B, D and G touch the same file.\n \n test_expect_success 'setup' '\n-\t: > file1 &&\n-\tgit add file1 &&\n-\ttest_tick &&\n-\tgit commit -m A &&\n-\tgit tag A &&\n-\techo 1 > file1 &&\n-\ttest_tick &&\n-\tgit commit -m B file1 &&\n-\t: > file2 &&\n-\tgit add file2 &&\n-\ttest_tick &&\n-\tgit commit -m C &&\n-\techo 2 > file1 &&\n-\ttest_tick &&\n-\tgit commit -m D file1 &&\n-\t: > file3 &&\n-\tgit add file3 &&\n-\ttest_tick &&\n-\tgit commit -m E &&\n+\ttest_commit A file1 &&\n+\ttest_commit B file1 &&\n+\ttest_commit C file2 &&\n+\ttest_commit D file1 &&\n+\ttest_commit E file3 &&\n \tgit checkout -b branch1 A &&\n-\t: > file4 &&\n-\tgit add file4 &&\n-\ttest_tick &&\n-\tgit commit -m F &&\n-\tgit tag F &&\n-\techo 3 > file1 &&\n-\ttest_tick &&\n-\tgit commit -m G file1 &&\n-\t: > file5 &&\n-\tgit add file5 &&\n-\ttest_tick &&\n-\tgit commit -m H &&\n+\ttest_commit F file4 &&\n+\ttest_commit G file1 &&\n+\ttest_commit H file5 &&\n \tgit checkout -b branch2 F &&\n-\t: > file6 &&\n-\tgit add file6 &&\n-\ttest_tick &&\n-\tgit commit -m I &&\n-\tgit tag I\n+\ttest_commit I file6\n '\n \n test_expect_success 'no changes are a nop' '\n@@ -111,19 +84,20 @@ test_expect_success 'exchange two commits' '\n \n cat > expect << EOF\n diff --git a/file1 b/file1\n-index e69de29..00750ed 100644\n+index f70f10e..fd79235 100644\n --- a/file1\n +++ b/file1\n-@@ -0,0 +1 @@\n-+3\n+@@ -1 +1 @@\n+-A\n++G\n EOF\n \n cat > expect2 << EOF\n <<<<<<< HEAD\n-2\n+D\n =======\n-3\n->>>>>>> b7ca976... G\n+G\n+>>>>>>> 91201e5... G\n EOF\n \n test_expect_success 'stop on conflicting pick' '\n-- \n1.6.6.rc1.34.gd7b83\n"},{"id":"129375","messageId":"ced6765cff6225a05f196a6896ab577850979ab1.1260099005.git.mhagger@alum.mit.edu","threadId":"21884","inReplyTo":"cover.1260099005.git.mhagger@alum.mit.edu","subject":"[PATCHv2 2/2] Add a command \"fixup\" to rebase --interactive","fromName":"Michael Haggerty","fromEmail":"mhagger@alum.mit.edu","sentAt":"2009-12-07T04:22:59Z","receivedAt":"2009-12-07T04:22:59Z","isPatch":false,"sender":{"key":"mhagger@alum.mit.edu","avatar":"https://avatars.githubusercontent.com/u/119718?v=4"},"body":"The command is like \"squash\", except that it discards the commit message\nof the corresponding commit.\n\nSigned-off-by: Michael Haggerty <mhagger@alum.mit.edu>\n---\n Documentation/git-rebase.txt  |   13 ++++++----\n git-rebase--interactive.sh    |   51 +++++++++++++++++++++++++++++++++--------\n t/lib-rebase.sh               |    7 +++--\n t/t3404-rebase-interactive.sh |   30 ++++++++++++++++++++++++\n 4 files changed, 83 insertions(+), 18 deletions(-)\n\ndiff --git a/Documentation/git-rebase.txt b/Documentation/git-rebase.txt\nindex ca5e1e8..9b648ec 100644\n--- a/Documentation/git-rebase.txt\n+++ b/Documentation/git-rebase.txt\n@@ -382,9 +382,12 @@ If you just want to edit the commit message for a commit, replace the\n command \"pick\" with the command \"reword\".\n \n If you want to fold two or more commits into one, replace the command\n-\"pick\" with \"squash\" for the second and subsequent commit.  If the\n-commits had different authors, it will attribute the squashed commit to\n-the author of the first commit.\n+\"pick\" for the second and subsequent commits with \"squash\" or \"fixup\".\n+If the commits had different authors, the folded commit will be\n+attributed to the author of the first commit.  The suggested commit\n+message for the folded commit is the concatenation of the commit\n+messages of the first commit and of those with the \"squash\" command,\n+but omits the commit messages of commits with the \"fixup\" command.\n \n 'git-rebase' will stop when \"pick\" has been replaced with \"edit\" or\n when a command fails due to merge errors. When you are done editing\n@@ -512,8 +515,8 @@ Easy case: The changes are literally the same.::\n Hard case: The changes are not the same.::\n \n \tThis happens if the 'subsystem' rebase had conflicts, or used\n-\t`\\--interactive` to omit, edit, or squash commits; or if the\n-\tupstream used one of `commit \\--amend`, `reset`, or\n+\t`\\--interactive` to omit, edit, squash, or fixup commits; or\n+\tif the upstream used one of `commit \\--amend`, `reset`, or\n \t`filter-branch`.\n \n \ndiff --git a/git-rebase--interactive.sh b/git-rebase--interactive.sh\nindex 0bd3bf7..a7de5ea 100755\n--- a/git-rebase--interactive.sh\n+++ b/git-rebase--interactive.sh\n@@ -302,7 +302,13 @@ nth_string () {\n \n make_squash_message () {\n \tif test -f \"$SQUASH_MSG\"; then\n-\t\tCOUNT=$(($(sed -n \"s/^# This is [^0-9]*\\([1-9][0-9]*\\).*/\\1/p\" \\\n+\t\t# We want to be careful about matching only the commit\n+\t\t# message comment lines generated by this function.\n+\t\t# But supposedly some sed versions don't handle \"\\|\"\n+\t\t# correctly, so instead of \"\\(st\\|nd\\|rd\\|th\\)\", use\n+\t\t# the less accurate \"[snrt][tdh]\" to match the\n+\t\t# nth_string endings.\n+\t\tCOUNT=$(($(sed -n \"s/^# Th[^0-9]*\\([1-9][0-9]*\\)[snrt][tdh] commit message.*:/\\1/p\" \\\n \t\t\t< \"$SQUASH_MSG\" | sed -ne '$p')+1))\n \t\techo \"# This is a combination of $COUNT commits.\"\n \t\tsed -e 1d -e '2,/^./{\n@@ -315,10 +321,26 @@ make_squash_message () {\n \t\techo\n \t\tgit cat-file commit HEAD | sed -e '1,/^$/d'\n \tfi\n-\techo\n-\techo \"# This is the $(nth_string $COUNT) commit message:\"\n-\techo\n-\tgit cat-file commit $1 | sed -e '1,/^$/d'\n+\tcase $1 in\n+\tsquash)\n+\t\techo\n+\t\techo \"# This is the $(nth_string $COUNT) commit message:\"\n+\t\techo\n+\t\tgit cat-file commit $2 | sed -e '1,/^$/d'\n+\t\t;;\n+\tfixup)\n+\t\techo\n+\t\techo \"# The $(nth_string $COUNT) commit message will be skipped:\"\n+\t\techo\n+\t\t# Comment the lines of the commit message out using\n+\t\t# \"#\" rather than \"# \" (a) to make them more distinct\n+\t\t# from the explanatory comments added by this function\n+\t\t# and (b) to make it less likely that the sed regexp\n+\t\t# above will be confused by a commented-out commit\n+\t\t# message.\n+\t\tgit cat-file commit $2 | sed -e '1,/^$/d' -e 's/^/#/'\n+\t\t;;\n+\tesac\n }\n \n peek_next_command () {\n@@ -367,20 +389,28 @@ do_next () {\n \t\twarn\n \t\texit 0\n \t\t;;\n-\tsquash|s)\n-\t\tcomment_for_reflog squash\n+\tsquash|s|fixup|f)\n+\t\tcase \"$command\" in\n+\t\tsquash|s)\n+\t\t\tsquash_style=squash\n+\t\t\t;;\n+\t\tfixup|f)\n+\t\t\tsquash_style=fixup\n+\t\t\t;;\n+\t\tesac\n+\t\tcomment_for_reflog $squash_style\n \n \t\ttest -f \"$DONE\" && has_action \"$DONE\" ||\n-\t\t\tdie \"Cannot 'squash' without a previous commit\"\n+\t\t\tdie \"Cannot '$squash_style' without a previous commit\"\n \n \t\tmark_action_done\n-\t\tmake_squash_message $sha1 > \"$MSG\"\n+\t\tmake_squash_message $squash_style $sha1 > \"$MSG\"\n \t\tfailed=f\n \t\tauthor_script=$(get_author_ident_from_commit HEAD)\n \t\toutput git reset --soft HEAD^\n \t\tpick_one -n $sha1 || failed=t\n \t\tcase \"$(peek_next_command)\" in\n-\t\tsquash|s)\n+\t\tsquash|s|fixup|f)\n \t\t\tUSE_OUTPUT=output\n \t\t\tMSG_OPT=-F\n \t\t\tEDIT_OR_FILE=\"$MSG\"\n@@ -768,6 +798,7 @@ first and then run 'git rebase --continue' again.\"\n #  r, reword = use commit, but edit the commit message\n #  e, edit = use commit, but stop for amending\n #  s, squash = use commit, but meld into previous commit\n+#  f, fixup = like \"squash\", but discard this commit's log message\n #\n # If you remove a line here THAT COMMIT WILL BE LOST.\n # However, if you remove everything, the rebase will be aborted.\ndiff --git a/t/lib-rebase.sh b/t/lib-rebase.sh\nindex 62f452c..f4dda02 100644\n--- a/t/lib-rebase.sh\n+++ b/t/lib-rebase.sh\n@@ -9,8 +9,9 @@\n #\n #\t\"[<lineno1>] [<lineno2>]...\"\n #\n-#   If a line number is prefixed with \"squash\", \"edit\", or \"reword\", the\n-#   respective line's command will be replaced with the specified one.\n+#   If a line number is prefixed with \"squash\", \"fixup\", \"edit\", or\n+#   \"reword\", the respective line's command will be replaced with the\n+#   specified one.\n \n set_fake_editor () {\n \techo \"#!$SHELL_PATH\" >fake-editor.sh\n@@ -32,7 +33,7 @@ cat \"$1\".tmp\n action=pick\n for line in $FAKE_LINES; do\n \tcase $line in\n-\tsquash|edit|reword)\n+\tsquash|fixup|edit|reword)\n \t\taction=\"$line\";;\n \t*)\n \t\techo sed -n \"${line}s/^pick/$action/p\"\ndiff --git a/t/t3404-rebase-interactive.sh b/t/t3404-rebase-interactive.sh\nindex 778daf4..ea26115 100755\n--- a/t/t3404-rebase-interactive.sh\n+++ b/t/t3404-rebase-interactive.sh\n@@ -235,6 +235,36 @@ test_expect_success 'multi-squash only fires up editor once' '\n \ttest 1 = $(git show | grep ONCE | wc -l)\n '\n \n+test_expect_success 'multi-fixup only fires up editor once' '\n+\tgit checkout -b multi-fixup E &&\n+\tbase=$(git rev-parse HEAD~4) &&\n+\tFAKE_COMMIT_AMEND=\"ONCE\" FAKE_LINES=\"1 fixup 2 fixup 3 fixup 4\" \\\n+\t\tgit rebase -i $base &&\n+\ttest $base = $(git rev-parse HEAD^) &&\n+\ttest 1 = $(git show | grep ONCE | wc -l) &&\n+\tgit checkout to-be-rebased &&\n+\tgit branch -D multi-fixup\n+'\n+\n+cat > expect-squash-fixup << EOF\n+B\n+\n+D\n+\n+ONCE\n+EOF\n+\n+test_expect_success 'squash and fixup generate correct log messages' '\n+\tgit checkout -b squash-fixup E &&\n+\tbase=$(git rev-parse HEAD~4) &&\n+\tFAKE_COMMIT_AMEND=\"ONCE\" FAKE_LINES=\"1 fixup 2 squash 3 fixup 4\" \\\n+\t\tgit rebase -i $base &&\n+\tgit cat-file commit HEAD | sed -e 1,/^\\$/d > actual-squash-fixup &&\n+\ttest_cmp expect-squash-fixup actual-squash-fixup &&\n+\tgit checkout to-be-rebased &&\n+\tgit branch -D squash-fixup\n+'\n+\n test_expect_success 'squash works as expected' '\n \tfor n in one two three four\n \tdo\n-- \n1.6.6.rc1.34.gd7b83\n"},{"id":"129383","messageId":"7vskbn9s1k.fsf@alter.siamese.dyndns.org","threadId":"21884","inReplyTo":"ced6765cff6225a05f196a6896ab577850979ab1.1260099005.git.mhagger@alum.mit.edu","subject":"Re: [PATCHv2 2/2] Add a command \"fixup\" to rebase --interactive","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2009-12-07T07:12:07Z","receivedAt":"2009-12-07T07:12:07Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Michael Haggerty <mhagger@alum.mit.edu> writes:\n\n> diff --git a/git-rebase--interactive.sh b/git-rebase--interactive.sh\n> index 0bd3bf7..a7de5ea 100755\n> --- a/git-rebase--interactive.sh\n> +++ b/git-rebase--interactive.sh\n> @@ -302,7 +302,13 @@ nth_string () {\n>  \n>  make_squash_message () {\n>  \tif test -f \"$SQUASH_MSG\"; then\n> -\t\tCOUNT=$(($(sed -n \"s/^# This is [^0-9]*\\([1-9][0-9]*\\).*/\\1/p\" \\\n> +\t\t# We want to be careful about matching only the commit\n> +\t\t# message comment lines generated by this function.\n\n> +\t\t# But supposedly some sed versions don't handle \"\\|\"\n> +\t\t# correctly, so instead of \"\\(st\\|nd\\|rd\\|th\\)\", use\n> +\t\t# the less accurate \"[snrt][tdh]\" to match the\n> +\t\t# nth_string endings.\n\nI'd drop this comment; blaming POSIX-compliant sed without GNU extension\nis simply wrong.\n\n> +\t\tCOUNT=$(($(sed -n \"s/^# Th[^0-9]*\\([1-9][0-9]*\\)[snrt][tdh] commit message.*:/\\1/p\" \\\n>  \t\t\t< \"$SQUASH_MSG\" | sed -ne '$p')+1))\n>  \t\techo \"# This is a combination of $COUNT commits.\"\n>  \t\tsed -e 1d -e '2,/^./{\n> @@ -315,10 +321,26 @@ make_squash_message () {\n>  \t\techo\n>  \t\tgit cat-file commit HEAD | sed -e '1,/^$/d'\n>  \tfi\n> -\techo\n> -\techo \"# This is the $(nth_string $COUNT) commit message:\"\n> -\techo\n> -\tgit cat-file commit $1 | sed -e '1,/^$/d'\n> +\tcase $1 in\n> +\tsquash)\n> +\t\techo\n> +\t\techo \"# This is the $(nth_string $COUNT) commit message:\"\n> +\t\techo\n> +\t\tgit cat-file commit $2 | sed -e '1,/^$/d'\n> +\t\t;;\n> +\tfixup)\n> +\t\techo\n> +\t\techo \"# The $(nth_string $COUNT) commit message will be skipped:\"\n> +\t\techo\n> +\t\t# Comment the lines of the commit message out using\n> +\t\t# \"#\" rather than \"# \" (a) to make them more distinct\n> +\t\t# from the explanatory comments added by this function\n> +\t\t# and (b) to make it less likely that the sed regexp\n> +\t\t# above will be confused by a commented-out commit\n> +\t\t# message.\n\nUse \"#  \" as prefix and you won't have to worry about a line in the log\nmessage that begins with \" Th\", no?\n\nIn any case, I agree that a comment like this is necessary to warn anybody\nwho will be touching the code that the COUNT=$((...))  needs to avoid\nmatching what is produced here, but I find the above 6-line comment a bit\ntoo excessive.\n"},{"id":"129394","messageId":"cover.1260177312.git.mhagger@alum.mit.edu","threadId":"21884","inReplyTo":"7vskbn9s1k.fsf@alter.siamese.dyndns.org","subject":"[PATCHv3 0/2] Add a \"fixup\" command to \"rebase --interactive\"","fromName":"Michael Haggerty","fromEmail":"mhagger@alum.mit.edu","sentAt":"2009-12-07T09:20:57Z","receivedAt":"2009-12-07T09:20:57Z","isPatch":false,"sender":{"key":"mhagger@alum.mit.edu","avatar":"https://avatars.githubusercontent.com/u/119718?v=4"},"body":"Junio C Hamano wrote:\n> Michael Haggerty <mhagger@alum.mit.edu> writes:\n> \n>> diff --git a/git-rebase--interactive.sh b/git-rebase--interactive.sh\n>> index 0bd3bf7..a7de5ea 100755\n>> --- a/git-rebase--interactive.sh\n>> +++ b/git-rebase--interactive.sh\n>> @@ -302,7 +302,13 @@ nth_string () {\n>>  \n>>  make_squash_message () {\n>>  \tif test -f \"$SQUASH_MSG\"; then\n>> -\t\tCOUNT=$(($(sed -n \"s/^# This is [^0-9]*\\([1-9][0-9]*\\).*/\\1/p\" \\\n>> +\t\t# We want to be careful about matching only the commit\n>> +\t\t# message comment lines generated by this function.\n> \n>> +\t\t# But supposedly some sed versions don't handle \"\\|\"\n>> +\t\t# correctly, so instead of \"\\(st\\|nd\\|rd\\|th\\)\", use\n>> +\t\t# the less accurate \"[snrt][tdh]\" to match the\n>> +\t\t# nth_string endings.\n> \n> I'd drop this comment; blaming POSIX-compliant sed without GNU extension\n> is simply wrong.\n\nFair enough.  I hope you don't mind my leaving a line explaining the\ncryptic \"[snrt][tdh]\" to save Dscho a couple of seconds next time :-).\n\n>> +\t\tCOUNT=$(($(sed -n \"s/^# Th[^0-9]*\\([1-9][0-9]*\\)[snrt][tdh] commit message.*:/\\1/p\" \\\n>>  \t\t\t< \"$SQUASH_MSG\" | sed -ne '$p')+1))\n>>  \t\techo \"# This is a combination of $COUNT commits.\"\n>>  \t\tsed -e 1d -e '2,/^./{\n>> @@ -315,10 +321,26 @@ make_squash_message () {\n>>  \t\techo\n>>  \t\tgit cat-file commit HEAD | sed -e '1,/^$/d'\n>>  \tfi\n>> -\techo\n>> -\techo \"# This is the $(nth_string $COUNT) commit message:\"\n>> -\techo\n>> -\tgit cat-file commit $1 | sed -e '1,/^$/d'\n>> +\tcase $1 in\n>> +\tsquash)\n>> +\t\techo\n>> +\t\techo \"# This is the $(nth_string $COUNT) commit message:\"\n>> +\t\techo\n>> +\t\tgit cat-file commit $2 | sed -e '1,/^$/d'\n>> +\t\t;;\n>> +\tfixup)\n>> +\t\techo\n>> +\t\techo \"# The $(nth_string $COUNT) commit message will be skipped:\"\n>> +\t\techo\n>> +\t\t# Comment the lines of the commit message out using\n>> +\t\t# \"#\" rather than \"# \" (a) to make them more distinct\n>> +\t\t# from the explanatory comments added by this function\n>> +\t\t# and (b) to make it less likely that the sed regexp\n>> +\t\t# above will be confused by a commented-out commit\n>> +\t\t# message.\n> \n> Use \"#  \" as prefix and you won't have to worry about a line in the log\n> message that begins with \" Th\", no?\n\nThe scenario seems pretty unlikely to me.  The line would not only\nhave to start with \" Th\" but also match the rest of the regexp.  And\nas far as I can see, the only ill effect of a mismatch would be to\nthrow off COUNT, which itself is only used in the instruction\ncomments.\n\nBy the way, if you are really worried about accidental matches to the\nregexp, this is not the end of the story.  It could be that a squashed\ncommit's log message has lines that match the regexp; e.g.,\n\n    commit -m '# This is my 380th commit message today:'\n\nThe commented-out line survives this first commit and would confuse an\ninteractive squash (with or without my patch).\n\nAmusingly, if you want to indicate at commit time that a commit\nmessage should be omitted at rebase time, you can add a comment\ncharacter intentionally:\n\n    commit -m '# this comment will be stripped out at the next squash'\n\nThis peculiarity also has nothing to do with the new \"fixup\" feature.\n\n> In any case, I agree that a comment like this is necessary to warn anybody\n> who will be touching the code that the COUNT=$((...))  needs to avoid\n> matching what is produced here, but I find the above 6-line comment a bit\n> too excessive.\n\nI have substituted a terser alternative.  Feel free to edit the\ncomment or delete it altogether.\n\nMichael\n\n\nMichael Haggerty (2):\n  t3404: Use test_commit to set up test repository\n  Add a command \"fixup\" to rebase --interactive\n\n Documentation/git-rebase.txt  |   13 +++--\n git-rebase--interactive.sh    |   45 +++++++++++++++----\n t/lib-rebase.sh               |    7 ++-\n t/t3404-rebase-interactive.sh |   96 +++++++++++++++++++++-------------------\n 4 files changed, 97 insertions(+), 64 deletions(-)\n"},{"id":"129395","messageId":"1b82a55c2a45b8f40ac0fe42d4ce2a55e72a2557.1260177312.git.mhagger@alum.mit.edu","threadId":"21884","inReplyTo":"7vskbn9s1k.fsf@alter.siamese.dyndns.org","subject":"[PATCHv3 1/2] t3404: Use test_commit to set up test repository","fromName":"Michael Haggerty","fromEmail":"mhagger@alum.mit.edu","sentAt":"2009-12-07T09:20:58Z","receivedAt":"2009-12-07T09:20:58Z","isPatch":false,"sender":{"key":"mhagger@alum.mit.edu","avatar":"https://avatars.githubusercontent.com/u/119718?v=4"},"body":"Also adjust \"expected\" text to reflect the file contents generated by\ntest_commit, which are slightly different than those generated by the\nold code.\n\nSigned-off-by: Michael Haggerty <mhagger@alum.mit.edu>\n---\n t/t3404-rebase-interactive.sh |   66 ++++++++++++----------------------------\n 1 files changed, 20 insertions(+), 46 deletions(-)\n\ndiff --git a/t/t3404-rebase-interactive.sh b/t/t3404-rebase-interactive.sh\nindex 3a37793..778daf4 100755\n--- a/t/t3404-rebase-interactive.sh\n+++ b/t/t3404-rebase-interactive.sh\n@@ -16,53 +16,26 @@ set_fake_editor\n \n # set up two branches like this:\n #\n-# A - B - C - D - E\n+# A - B - C - D - E     (master)\n #   \\\n-#     F - G - H\n+#     F - G - H         (branch1)\n #       \\\n-#         I\n+#         I             (branch2)\n #\n-# where B, D and G touch the same file.\n+# where A, B, D and G touch the same file.\n \n test_expect_success 'setup' '\n-\t: > file1 &&\n-\tgit add file1 &&\n-\ttest_tick &&\n-\tgit commit -m A &&\n-\tgit tag A &&\n-\techo 1 > file1 &&\n-\ttest_tick &&\n-\tgit commit -m B file1 &&\n-\t: > file2 &&\n-\tgit add file2 &&\n-\ttest_tick &&\n-\tgit commit -m C &&\n-\techo 2 > file1 &&\n-\ttest_tick &&\n-\tgit commit -m D file1 &&\n-\t: > file3 &&\n-\tgit add file3 &&\n-\ttest_tick &&\n-\tgit commit -m E &&\n+\ttest_commit A file1 &&\n+\ttest_commit B file1 &&\n+\ttest_commit C file2 &&\n+\ttest_commit D file1 &&\n+\ttest_commit E file3 &&\n \tgit checkout -b branch1 A &&\n-\t: > file4 &&\n-\tgit add file4 &&\n-\ttest_tick &&\n-\tgit commit -m F &&\n-\tgit tag F &&\n-\techo 3 > file1 &&\n-\ttest_tick &&\n-\tgit commit -m G file1 &&\n-\t: > file5 &&\n-\tgit add file5 &&\n-\ttest_tick &&\n-\tgit commit -m H &&\n+\ttest_commit F file4 &&\n+\ttest_commit G file1 &&\n+\ttest_commit H file5 &&\n \tgit checkout -b branch2 F &&\n-\t: > file6 &&\n-\tgit add file6 &&\n-\ttest_tick &&\n-\tgit commit -m I &&\n-\tgit tag I\n+\ttest_commit I file6\n '\n \n test_expect_success 'no changes are a nop' '\n@@ -111,19 +84,20 @@ test_expect_success 'exchange two commits' '\n \n cat > expect << EOF\n diff --git a/file1 b/file1\n-index e69de29..00750ed 100644\n+index f70f10e..fd79235 100644\n --- a/file1\n +++ b/file1\n-@@ -0,0 +1 @@\n-+3\n+@@ -1 +1 @@\n+-A\n++G\n EOF\n \n cat > expect2 << EOF\n <<<<<<< HEAD\n-2\n+D\n =======\n-3\n->>>>>>> b7ca976... G\n+G\n+>>>>>>> 91201e5... G\n EOF\n \n test_expect_success 'stop on conflicting pick' '\n-- \n1.6.5.5\n"},{"id":"129396","messageId":"d81f8fc2655f77cfb09830dcda68c1b5713c5b4d.1260177312.git.mhagger@alum.mit.edu","threadId":"21884","inReplyTo":"7vskbn9s1k.fsf@alter.siamese.dyndns.org","subject":"[PATCHv3 2/2] Add a command \"fixup\" to rebase --interactive","fromName":"Michael Haggerty","fromEmail":"mhagger@alum.mit.edu","sentAt":"2009-12-07T09:20:59Z","receivedAt":"2009-12-07T09:20:59Z","isPatch":false,"sender":{"key":"mhagger@alum.mit.edu","avatar":"https://avatars.githubusercontent.com/u/119718?v=4"},"body":"The command is like \"squash\", except that it discards the commit message\nof the corresponding commit.\n\nSigned-off-by: Michael Haggerty <mhagger@alum.mit.edu>\n---\n Documentation/git-rebase.txt  |   13 +++++++----\n git-rebase--interactive.sh    |   45 +++++++++++++++++++++++++++++++---------\n t/lib-rebase.sh               |    7 +++--\n t/t3404-rebase-interactive.sh |   30 +++++++++++++++++++++++++++\n 4 files changed, 77 insertions(+), 18 deletions(-)\n\ndiff --git a/Documentation/git-rebase.txt b/Documentation/git-rebase.txt\nindex ca5e1e8..9b648ec 100644\n--- a/Documentation/git-rebase.txt\n+++ b/Documentation/git-rebase.txt\n@@ -382,9 +382,12 @@ If you just want to edit the commit message for a commit, replace the\n command \"pick\" with the command \"reword\".\n \n If you want to fold two or more commits into one, replace the command\n-\"pick\" with \"squash\" for the second and subsequent commit.  If the\n-commits had different authors, it will attribute the squashed commit to\n-the author of the first commit.\n+\"pick\" for the second and subsequent commits with \"squash\" or \"fixup\".\n+If the commits had different authors, the folded commit will be\n+attributed to the author of the first commit.  The suggested commit\n+message for the folded commit is the concatenation of the commit\n+messages of the first commit and of those with the \"squash\" command,\n+but omits the commit messages of commits with the \"fixup\" command.\n \n 'git-rebase' will stop when \"pick\" has been replaced with \"edit\" or\n when a command fails due to merge errors. When you are done editing\n@@ -512,8 +515,8 @@ Easy case: The changes are literally the same.::\n Hard case: The changes are not the same.::\n \n \tThis happens if the 'subsystem' rebase had conflicts, or used\n-\t`\\--interactive` to omit, edit, or squash commits; or if the\n-\tupstream used one of `commit \\--amend`, `reset`, or\n+\t`\\--interactive` to omit, edit, squash, or fixup commits; or\n+\tif the upstream used one of `commit \\--amend`, `reset`, or\n \t`filter-branch`.\n \n \ndiff --git a/git-rebase--interactive.sh b/git-rebase--interactive.sh\nindex 0bd3bf7..cd2dce1 100755\n--- a/git-rebase--interactive.sh\n+++ b/git-rebase--interactive.sh\n@@ -302,7 +302,10 @@ nth_string () {\n \n make_squash_message () {\n \tif test -f \"$SQUASH_MSG\"; then\n-\t\tCOUNT=$(($(sed -n \"s/^# This is [^0-9]*\\([1-9][0-9]*\\).*/\\1/p\" \\\n+\t\t# We want to be careful about matching only the commit\n+\t\t# message comment lines generated by this function.\n+\t\t# \"[snrt][tdh]\" matches the nth_string endings.\n+\t\tCOUNT=$(($(sed -n \"s/^# Th[^0-9]*\\([1-9][0-9]*\\)[snrt][tdh] commit message.*:/\\1/p\" \\\n \t\t\t< \"$SQUASH_MSG\" | sed -ne '$p')+1))\n \t\techo \"# This is a combination of $COUNT commits.\"\n \t\tsed -e 1d -e '2,/^./{\n@@ -315,10 +318,23 @@ make_squash_message () {\n \t\techo\n \t\tgit cat-file commit HEAD | sed -e '1,/^$/d'\n \tfi\n-\techo\n-\techo \"# This is the $(nth_string $COUNT) commit message:\"\n-\techo\n-\tgit cat-file commit $1 | sed -e '1,/^$/d'\n+\tcase $1 in\n+\tsquash)\n+\t\techo\n+\t\techo \"# This is the $(nth_string $COUNT) commit message:\"\n+\t\techo\n+\t\tgit cat-file commit $2 | sed -e '1,/^$/d'\n+\t\t;;\n+\tfixup)\n+\t\techo\n+\t\techo \"# The $(nth_string $COUNT) commit message will be skipped:\"\n+\t\techo\n+\t\t# Comment the lines of the commit message out using\n+\t\t# \"#\" rather than \"# \" to make them less likely to\n+\t\t# confuse the sed regexp above.\n+\t\tgit cat-file commit $2 | sed -e '1,/^$/d' -e 's/^/#/'\n+\t\t;;\n+\tesac\n }\n \n peek_next_command () {\n@@ -367,20 +383,28 @@ do_next () {\n \t\twarn\n \t\texit 0\n \t\t;;\n-\tsquash|s)\n-\t\tcomment_for_reflog squash\n+\tsquash|s|fixup|f)\n+\t\tcase \"$command\" in\n+\t\tsquash|s)\n+\t\t\tsquash_style=squash\n+\t\t\t;;\n+\t\tfixup|f)\n+\t\t\tsquash_style=fixup\n+\t\t\t;;\n+\t\tesac\n+\t\tcomment_for_reflog $squash_style\n \n \t\ttest -f \"$DONE\" && has_action \"$DONE\" ||\n-\t\t\tdie \"Cannot 'squash' without a previous commit\"\n+\t\t\tdie \"Cannot '$squash_style' without a previous commit\"\n \n \t\tmark_action_done\n-\t\tmake_squash_message $sha1 > \"$MSG\"\n+\t\tmake_squash_message $squash_style $sha1 > \"$MSG\"\n \t\tfailed=f\n \t\tauthor_script=$(get_author_ident_from_commit HEAD)\n \t\toutput git reset --soft HEAD^\n \t\tpick_one -n $sha1 || failed=t\n \t\tcase \"$(peek_next_command)\" in\n-\t\tsquash|s)\n+\t\tsquash|s|fixup|f)\n \t\t\tUSE_OUTPUT=output\n \t\t\tMSG_OPT=-F\n \t\t\tEDIT_OR_FILE=\"$MSG\"\n@@ -768,6 +792,7 @@ first and then run 'git rebase --continue' again.\"\n #  r, reword = use commit, but edit the commit message\n #  e, edit = use commit, but stop for amending\n #  s, squash = use commit, but meld into previous commit\n+#  f, fixup = like \"squash\", but discard this commit's log message\n #\n # If you remove a line here THAT COMMIT WILL BE LOST.\n # However, if you remove everything, the rebase will be aborted.\ndiff --git a/t/lib-rebase.sh b/t/lib-rebase.sh\nindex 62f452c..f4dda02 100644\n--- a/t/lib-rebase.sh\n+++ b/t/lib-rebase.sh\n@@ -9,8 +9,9 @@\n #\n #\t\"[<lineno1>] [<lineno2>]...\"\n #\n-#   If a line number is prefixed with \"squash\", \"edit\", or \"reword\", the\n-#   respective line's command will be replaced with the specified one.\n+#   If a line number is prefixed with \"squash\", \"fixup\", \"edit\", or\n+#   \"reword\", the respective line's command will be replaced with the\n+#   specified one.\n \n set_fake_editor () {\n \techo \"#!$SHELL_PATH\" >fake-editor.sh\n@@ -32,7 +33,7 @@ cat \"$1\".tmp\n action=pick\n for line in $FAKE_LINES; do\n \tcase $line in\n-\tsquash|edit|reword)\n+\tsquash|fixup|edit|reword)\n \t\taction=\"$line\";;\n \t*)\n \t\techo sed -n \"${line}s/^pick/$action/p\"\ndiff --git a/t/t3404-rebase-interactive.sh b/t/t3404-rebase-interactive.sh\nindex 778daf4..ea26115 100755\n--- a/t/t3404-rebase-interactive.sh\n+++ b/t/t3404-rebase-interactive.sh\n@@ -235,6 +235,36 @@ test_expect_success 'multi-squash only fires up editor once' '\n \ttest 1 = $(git show | grep ONCE | wc -l)\n '\n \n+test_expect_success 'multi-fixup only fires up editor once' '\n+\tgit checkout -b multi-fixup E &&\n+\tbase=$(git rev-parse HEAD~4) &&\n+\tFAKE_COMMIT_AMEND=\"ONCE\" FAKE_LINES=\"1 fixup 2 fixup 3 fixup 4\" \\\n+\t\tgit rebase -i $base &&\n+\ttest $base = $(git rev-parse HEAD^) &&\n+\ttest 1 = $(git show | grep ONCE | wc -l) &&\n+\tgit checkout to-be-rebased &&\n+\tgit branch -D multi-fixup\n+'\n+\n+cat > expect-squash-fixup << EOF\n+B\n+\n+D\n+\n+ONCE\n+EOF\n+\n+test_expect_success 'squash and fixup generate correct log messages' '\n+\tgit checkout -b squash-fixup E &&\n+\tbase=$(git rev-parse HEAD~4) &&\n+\tFAKE_COMMIT_AMEND=\"ONCE\" FAKE_LINES=\"1 fixup 2 squash 3 fixup 4\" \\\n+\t\tgit rebase -i $base &&\n+\tgit cat-file commit HEAD | sed -e 1,/^\\$/d > actual-squash-fixup &&\n+\ttest_cmp expect-squash-fixup actual-squash-fixup &&\n+\tgit checkout to-be-rebased &&\n+\tgit branch -D squash-fixup\n+'\n+\n test_expect_success 'squash works as expected' '\n \tfor n in one two three four\n \tdo\n-- \n1.6.5.5\n"},{"id":"129402","messageId":"alpine.DEB.1.00.0912071220430.4985@pacific.mpi-cbg.de","threadId":"21884","inReplyTo":"cover.1260177312.git.mhagger@alum.mit.edu","subject":"Re: [PATCHv3 0/2] Add a \"fixup\" command to \"rebase --interactive\"","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2009-12-07T11:21:09Z","receivedAt":"2009-12-07T11:21:09Z","isPatch":false,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Mon, 7 Dec 2009, Michael Haggerty wrote:\n\n> Junio C Hamano wrote:\n> > Michael Haggerty <mhagger@alum.mit.edu> writes:\n> > \n> >> diff --git a/git-rebase--interactive.sh b/git-rebase--interactive.sh\n> >> index 0bd3bf7..a7de5ea 100755\n> >> --- a/git-rebase--interactive.sh\n> >> +++ b/git-rebase--interactive.sh\n> >> @@ -302,7 +302,13 @@ nth_string () {\n> >>  \n> >>  make_squash_message () {\n> >>  \tif test -f \"$SQUASH_MSG\"; then\n> >> -\t\tCOUNT=$(($(sed -n \"s/^# This is [^0-9]*\\([1-9][0-9]*\\).*/\\1/p\" \\\n> >> +\t\t# We want to be careful about matching only the commit\n> >> +\t\t# message comment lines generated by this function.\n> > \n> >> +\t\t# But supposedly some sed versions don't handle \"\\|\"\n> >> +\t\t# correctly, so instead of \"\\(st\\|nd\\|rd\\|th\\)\", use\n> >> +\t\t# the less accurate \"[snrt][tdh]\" to match the\n> >> +\t\t# nth_string endings.\n> > \n> > I'd drop this comment; blaming POSIX-compliant sed without GNU extension\n> > is simply wrong.\n> \n> Fair enough.  I hope you don't mind my leaving a line explaining the\n> cryptic \"[snrt][tdh]\" to save Dscho a couple of seconds next time :-).\n\nThanks, very much appreciated here.\n\nMy ACK for the patches is still valid.\n"},{"id":"129403","messageId":"fabb9a1e0912070326s6cda5c8r442c4816538d0e2a@mail.gmail.com","threadId":"21884","inReplyTo":"ced6765cff6225a05f196a6896ab577850979ab1.1260099005.git.mhagger@alum.mit.edu","subject":"Re: [PATCHv2 2/2] Add a command \"fixup\" to rebase --interactive","fromName":"Sverre Rabbelier","fromEmail":"srabbelier@gmail.com","sentAt":"2009-12-07T11:26:37Z","receivedAt":"2009-12-07T11:26:37Z","isPatch":false,"sender":{"key":"srabbelier@gmail.com","avatar":"https://avatars.githubusercontent.com/u/3098?v=4"},"body":"Heya,\n\nOn Mon, Dec 7, 2009 at 05:22, Michael Haggerty <mhagger@alum.mit.edu> wrote:\n> The command is like \"squash\", except that it discards the commit message\n> of the corresponding commit.\n\nNo no, wait, wasn't \"fixup\" supposed to let you just edit the commit\nmessage of the commit you're fixing up? :(\n\n-- \nCheers,\n\nSverre Rabbelier\n"},{"id":"129416","messageId":"4B1CEA06.6030704@alum.mit.edu","threadId":"21884","inReplyTo":"fabb9a1e0912070326s6cda5c8r442c4816538d0e2a@mail.gmail.com","subject":"Re: [PATCHv2 2/2] Add a command \"fixup\" to rebase --interactive","fromName":"Michael Haggerty","fromEmail":"mhagger@alum.mit.edu","sentAt":"2009-12-07T11:41:58Z","receivedAt":"2009-12-07T11:41:58Z","isPatch":false,"sender":{"key":"mhagger@alum.mit.edu","avatar":"https://avatars.githubusercontent.com/u/119718?v=4"},"body":"Sverre Rabbelier wrote:\n> On Mon, Dec 7, 2009 at 05:22, Michael Haggerty <mhagger@alum.mit.edu> wrote:\n>> The command is like \"squash\", except that it discards the commit message\n>> of the corresponding commit.\n> \n> No no, wait, wasn't \"fixup\" supposed to let you just edit the commit\n> message of the commit you're fixing up? :(\n\nThat command is called \"reword\".\n\nMichael\n"},{"id":"129417","messageId":"vpqtyw3808q.fsf@bauges.imag.fr","threadId":"21884","inReplyTo":"fabb9a1e0912070326s6cda5c8r442c4816538d0e2a@mail.gmail.com","subject":"Re: [PATCHv2 2/2] Add a command \"fixup\" to rebase --interactive","fromName":"Matthieu Moy","fromEmail":"matthieu.moy@grenoble-inp.fr","sentAt":"2009-12-07T11:57:57Z","receivedAt":"2009-12-07T11:57:57Z","isPatch":false,"sender":{"key":"matthieu.moy@grenoble-inp.fr","avatar":"https://gravatar.com/avatar/72c8a2705971a25dfaff23cece15130d405685845d911aedd5667ace277f3fc5?d=mp&s=160"},"body":"Sverre Rabbelier <srabbelier@gmail.com> writes:\n\n> Heya,\n>\n> On Mon, Dec 7, 2009 at 05:22, Michael Haggerty <mhagger@alum.mit.edu> wrote:\n>> The command is like \"squash\", except that it discards the commit message\n>> of the corresponding commit.\n>\n> No no, wait, wasn't \"fixup\" supposed to let you just edit the commit\n> message of the commit you're fixing up? :(\n\nThis is \"reword\", already in Git (6741aa6c399dec3d8f0b2, Wed Oct 7\n08:13:23 2009).\n\n--\nMatthieu Moy\nhttp://www-verimag.imag.fr/~moy/\n"},{"id":"129418","messageId":"fabb9a1e0912070404h3e4eeac9m484ee4fc787a3d7a@mail.gmail.com","threadId":"21884","inReplyTo":"vpqtyw3808q.fsf@bauges.imag.fr","subject":"Re: [PATCHv2 2/2] Add a command \"fixup\" to rebase --interactive","fromName":"Sverre Rabbelier","fromEmail":"srabbelier@gmail.com","sentAt":"2009-12-07T12:04:57Z","receivedAt":"2009-12-07T12:04:57Z","isPatch":false,"sender":{"key":"srabbelier@gmail.com","avatar":"https://avatars.githubusercontent.com/u/3098?v=4"},"body":"Heya,\n\nOn Mon, Dec 7, 2009 at 12:57, Matthieu Moy <Matthieu.Moy@grenoble-inp.fr> wrote:\n> This is \"reword\", already in Git (6741aa6c399dec3d8f0b2, Wed Oct 7\n> 08:13:23 2009).\n\nOh, wow, I've been missing out then :D. Thanks both!\n\n-- \nCheers,\n\nSverre Rabbelier\n"},{"id":"129512","messageId":"7vy6ldg6lz.fsf@alter.siamese.dyndns.org","threadId":"21884","inReplyTo":"1b82a55c2a45b8f40ac0fe42d4ce2a55e72a2557.1260177312.git.mhagger@alum.mit.edu","subject":"Re: [PATCHv3 1/2] t3404: Use test_commit to set up test repository","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2009-12-08T09:25:28Z","receivedAt":"2009-12-08T09:25:28Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Thanks; will re-queue [2/2] as [1/2] seems to be unchanged.\n"}]}