git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] rebase -i: interrupt rebase when "commit --amend" failed during "reword"

From
Andrew Wong <andrew.kw.w@gmail.com>
Date
Nov 30, 2011, 15:52 UTC
Message-ID
<1322668371-21218-1-git-send-email-andrew.kw.w@gmail.com>
In-Reply-To
<7vk46isncq.fsf@alter.siamese.dyndns.org>
On 11-11-29 3:08 PM, Junio C Hamano wrote:
> Is there anything we should be saying more than "fatal: Cannot amend" to
> help users when this new "die" triggers? 
Ah, yes, that would be helpful.

The situation is actually very similar to an "edit", where a pick is successful but requires user intervention. So I'm planning to refactor the behavior and message from "edit" into a function called "exit_with_patch". Then call the function from "reword" as well. Though it bothers me a bit that I have to pass in an exit code as well, since we want the exit status for "reword" to indicate a failure, but "edit" needs to indicate a success. Is this acceptable? Or should I just not bother with refactoring?

Andrew Wong (1):
  rebase -i: interrupt rebase when "commit --amend" failed during
    "reword"
 git-rebase--interactive.sh |   36 +++++++++++++++++++++++-------------
 1 files changed, 23 insertions(+), 13 deletions(-)
-- 
1.7.8.rc3.32.gb0399.dirty
Previous: Junio C HamanoNext: Andrew Wong
Message 5 of 6 in “BUG. git rebase -i successfully continues (and also skips rewording) when pre-commit hook fails (exits with non-zero code)”
  1. Alexey ShumkinNov 17, 2011
  2. Andrew WongNov 28, 2011
  3. rebase -i: interrupt rebase when "commit --amend" failed during "reword"Andrew Wong, Nov 28, 2011
  4. Junio C HamanoNov 29, 2011
  5. Andrew WongNov 30, 2011
  6. rebase -i: interrupt rebase when "commit --amend" failed during "reword"Andrew Wong, Nov 30, 2011

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.