git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* rebase -i reword converts to pick on pre-commit non-zero exit
@ 2012-02-01 21:27 Neal Kreitzinger
  2012-02-01 21:28 ` Neal Kreitzinger
  0 siblings, 1 reply; 4+ messages in thread
From: Neal Kreitzinger @ 2012-02-01 21:27 UTC (permalink / raw)
  To: git

When interactive rebase does the reword command it runs the pre-commit hook 
for that commit (a).  If the pre-commit hook gives a non-zero exit then 
interactive rebase picks commit (a) and continues to the next commit (b) in 
the rebase-to-do-list.  Instead of picking commit (a) when the pre-commit 
hook exits non-zero on the reword command, shouldn't interactive rebase 
learn to edit commit (a) and tell the user that because the pre-commit hook 
exited non-zero they need to either remedy the pre-commit hook violations 
and run git commit --amend or run git commit --amend --no-verify to bypass 
the pre-commit hook?  Otherwise, you have to run another rebase after the 
rejected rewords and edit those commits to accomplish the rewords.

v/r,
neal 

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: rebase -i reword converts to pick on pre-commit non-zero exit
  2012-02-01 21:27 rebase -i reword converts to pick on pre-commit non-zero exit Neal Kreitzinger
@ 2012-02-01 21:28 ` Neal Kreitzinger
  2012-02-02  4:12   ` Andrew Wong
  0 siblings, 1 reply; 4+ messages in thread
From: Neal Kreitzinger @ 2012-02-01 21:28 UTC (permalink / raw)
  To: git; +Cc: git

On 2/1/2012 3:27 PM, Neal Kreitzinger wrote:
> When interactive rebase does the reword command it runs the pre-commit hook
> for that commit (a).  If the pre-commit hook gives a non-zero exit then
> interactive rebase picks commit (a) and continues to the next commit (b) in
> the rebase-to-do-list.  Instead of picking commit (a) when the pre-commit
> hook exits non-zero on the reword command, shouldn't interactive rebase
> learn to edit commit (a) and tell the user that because the pre-commit hook
> exited non-zero they need to either remedy the pre-commit hook violations
> and run git commit --amend or run git commit --amend --no-verify to bypass
> the pre-commit hook?  Otherwise, you have to run another rebase after the
> rejected rewords and edit those commits to accomplish the rewords.
>
git 1.7.1

v/r,
neal

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: rebase -i reword converts to pick on pre-commit non-zero exit
  2012-02-01 21:28 ` Neal Kreitzinger
@ 2012-02-02  4:12   ` Andrew Wong
  2012-02-02 16:21     ` Neal Kreitzinger
  0 siblings, 1 reply; 4+ messages in thread
From: Andrew Wong @ 2012-02-02  4:12 UTC (permalink / raw)
  To: Neal Kreitzinger; +Cc: git

On 12-02-01 4:28 PM, Neal Kreitzinger wrote:
> Instead of picking commit (a) when the pre-commit
> hook exits non-zero on the reword command, shouldn't interactive rebase
> learn to edit commit (a) and tell the user that because the pre-commit 
> hook
> exited non-zero they need to either remedy the pre-commit hook violations
> and run git commit --amend or run git commit --amend --no-verify to 
> bypass
> the pre-commit hook?

Yup, I've submitted a patch to address this issue a while ago. This new 
behavior should be in v.1.7.8.2 and later.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: rebase -i reword converts to pick on pre-commit non-zero exit
  2012-02-02  4:12   ` Andrew Wong
@ 2012-02-02 16:21     ` Neal Kreitzinger
  0 siblings, 0 replies; 4+ messages in thread
From: Neal Kreitzinger @ 2012-02-02 16:21 UTC (permalink / raw)
  To: Andrew Wong; +Cc: git

On 2/1/2012 10:12 PM, Andrew Wong wrote:
> On 12-02-01 4:28 PM, Neal Kreitzinger wrote:
>> Instead of picking commit (a) when the pre-commit hook exits
>> non-zero on the reword command, shouldn't interactive rebase learn
>> to edit commit (a) and tell the user that because the pre-commit
>> hook exited non-zero they need to either remedy the pre-commit hook
>> violations and run git commit --amend or run git commit --amend
>> --no-verify to bypass the pre-commit hook?
>
> Yup, I've submitted a patch to address this issue a while ago. This
> new behavior should be in v.1.7.8.2 and later.

I now see that this 1.7.8.2 release note applies:

  * When a "reword" action in "git rebase -i" failed to run "commit 
--amend",
    we did not give the control back to the user to resolve the
situation, and
    instead kept the original commit log message.

thanks!

v/r,
neal

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2012-02-02 16:22 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-02-01 21:27 rebase -i reword converts to pick on pre-commit non-zero exit Neal Kreitzinger
2012-02-01 21:28 ` Neal Kreitzinger
2012-02-02  4:12   ` Andrew Wong
2012-02-02 16:21     ` Neal Kreitzinger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).