{"thread":{"id":"29506","subject":"rebase -i reword converts to pick on pre-commit non-zero exit","startedAt":"2012-02-01T21:27:44Z","lastAt":"2012-02-02T16:21:56Z","messageCount":4,"participants":["Neal Kreitzinger","Andrew Wong"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"183499","messageId":"jgcaoh$d9q$1@dough.gmane.org","threadId":"29506","inReplyTo":null,"subject":"rebase -i reword converts to pick on pre-commit non-zero exit","fromName":"Neal Kreitzinger","fromEmail":"neal@rsss.com","sentAt":"2012-02-01T21:27:44Z","receivedAt":"2012-02-01T21:27:44Z","isPatch":false,"sender":{"key":"neal@rsss.com","avatar":null},"body":"When interactive rebase does the reword command it runs the pre-commit hook \nfor that commit (a).  If the pre-commit hook gives a non-zero exit then \ninteractive rebase picks commit (a) and continues to the next commit (b) in \nthe rebase-to-do-list.  Instead of picking commit (a) when the pre-commit \nhook exits non-zero on the reword command, shouldn't interactive rebase \nlearn to edit commit (a) and tell the user that because the pre-commit hook \nexited non-zero they need to either remedy the pre-commit hook violations \nand run git commit --amend or run git commit --amend --no-verify to bypass \nthe pre-commit hook?  Otherwise, you have to run another rebase after the \nrejected rewords and edit those commits to accomplish the rewords.\n\nv/r,\nneal \n"},{"id":"183500","messageId":"4F29AE8E.6070109@gmail.com","threadId":"29506","inReplyTo":"jgcaoh$d9q$1@dough.gmane.org","subject":"Re: rebase -i reword converts to pick on pre-commit non-zero exit","fromName":"Neal Kreitzinger","fromEmail":"nkreitzinger@gmail.com","sentAt":"2012-02-01T21:28:46Z","receivedAt":"2012-02-01T21:28:46Z","isPatch":false,"sender":{"key":"nkreitzinger@gmail.com","avatar":null},"body":"On 2/1/2012 3:27 PM, Neal Kreitzinger wrote:\n> When interactive rebase does the reword command it runs the pre-commit hook\n> for that commit (a).  If the pre-commit hook gives a non-zero exit then\n> interactive rebase picks commit (a) and continues to the next commit (b) in\n> the rebase-to-do-list.  Instead of picking commit (a) when the pre-commit\n> hook exits non-zero on the reword command, shouldn't interactive rebase\n> learn to edit commit (a) and tell the user that because the pre-commit hook\n> exited non-zero they need to either remedy the pre-commit hook violations\n> and run git commit --amend or run git commit --amend --no-verify to bypass\n> the pre-commit hook?  Otherwise, you have to run another rebase after the\n> rejected rewords and edit those commits to accomplish the rewords.\n>\ngit 1.7.1\n\nv/r,\nneal\n"},{"id":"183539","messageId":"4F2A0D4B.6000001@sohovfx.com","threadId":"29506","inReplyTo":"4F29AE8E.6070109@gmail.com","subject":"Re: rebase -i reword converts to pick on pre-commit non-zero exit","fromName":"Andrew Wong","fromEmail":"andrew.w@sohovfx.com","sentAt":"2012-02-02T04:12:59Z","receivedAt":"2012-02-02T04:12:59Z","isPatch":false,"sender":{"key":"andrew.w@sohovfx.com","avatar":null},"body":"On 12-02-01 4:28 PM, Neal Kreitzinger wrote:\n> Instead of picking commit (a) when the pre-commit\n> hook exits non-zero on the reword command, shouldn't interactive rebase\n> learn to edit commit (a) and tell the user that because the pre-commit \n> hook\n> exited non-zero they need to either remedy the pre-commit hook violations\n> and run git commit --amend or run git commit --amend --no-verify to \n> bypass\n> the pre-commit hook?\n\nYup, I've submitted a patch to address this issue a while ago. This new \nbehavior should be in v.1.7.8.2 and later.\n"},{"id":"183612","messageId":"4F2AB824.2030609@gmail.com","threadId":"29506","inReplyTo":"4F2A0D4B.6000001@sohovfx.com","subject":"Re: rebase -i reword converts to pick on pre-commit non-zero exit","fromName":"Neal Kreitzinger","fromEmail":"nkreitzinger@gmail.com","sentAt":"2012-02-02T16:21:56Z","receivedAt":"2012-02-02T16:21:56Z","isPatch":false,"sender":{"key":"nkreitzinger@gmail.com","avatar":null},"body":"On 2/1/2012 10:12 PM, Andrew Wong wrote:\n> On 12-02-01 4:28 PM, Neal Kreitzinger wrote:\n>> Instead of picking commit (a) when the pre-commit hook exits\n>> non-zero on the reword command, shouldn't interactive rebase learn\n>> to edit commit (a) and tell the user that because the pre-commit\n>> hook exited non-zero they need to either remedy the pre-commit hook\n>> violations and run git commit --amend or run git commit --amend\n>> --no-verify to bypass the pre-commit hook?\n>\n> Yup, I've submitted a patch to address this issue a while ago. This\n> new behavior should be in v.1.7.8.2 and later.\n\nI now see that this 1.7.8.2 release note applies:\n\n  * When a \"reword\" action in \"git rebase -i\" failed to run \"commit \n--amend\",\n    we did not give the control back to the user to resolve the\nsituation, and\n    instead kept the original commit log message.\n\nthanks!\n\nv/r,\nneal\n"}]}