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

Re: [PATCH 1/2] rebase: check for errors from git-commit

From
Junio C Hamano <junkio@cox.net>
Date
Jun 28, 2006, 09:25 UTC
Message-ID
<7v1wt94oom.fsf@assigned-by-dhcp.cox.net>
In-Reply-To
<11514858662929-git-send-email-normalperson@yhbt.net>
Eric Wong <normalperson@yhbt.net> writes:
Show 19 quoted lines
>  I've grown used to having 'set -e' at the beginning of my shell
>  scripts.  IMHO it'd be a good idea to start moving towards this
>  eventually (even though shell scripts seem to be getting phased-out
>  somewhat).
>
>  git-rebase.sh |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/git-rebase.sh b/git-rebase.sh
> index 9ad1c44..47c8e8f 100755
> --- a/git-rebase.sh
> +++ b/git-rebase.sh
> @@ -59,8 +59,8 @@ continue_merge () {
>  
>  	if test -n "`git-diff-index HEAD`"
>  	then
> +		git-commit -C "`cat $dotest/current`" || die 'Commit failed'
>  		printf "Committed: %0${prec}d" $msgnum
> -		git-commit -C "`cat $dotest/current`"

Anticipating failure from "git-commit" is the right thing to do, but this is a "Now what?" situation. What is the expected course of action to recover from this for the end user, and how can we phrase the error message to help that process?

Previous: Eric Wong
Message 3 of 3 in “rebase: check for errors from git-commit”
  1. 1/2 rebase: check for errors from git-commitEric Wong, Jun 28, 2006
  2. 2/2 rebase: get rid of outdated MRESOLVEMSGEric Wong, Jun 28, 2006
  3. Junio C HamanoJun 28, 2006

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.