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

Re: [PATCH] git-tag: support -F <file> option

From
Junio C Hamano <junkio@cox.net>
Date
Dec 22, 2006, 06:47 UTC
Message-ID
<7vvek45svl.fsf@assigned-by-dhcp.cox.net>
In-Reply-To
<Pine.LNX.4.63.0612211512160.19693@wbgn013.biozentrum.uni-wuerzburg.de>
Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:
Show 5 quoted lines
> This imitates the behaviour of git-commit.
>
> Noticed by Han-Wen Nienhuys.
>
> Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Ok, but what the **** is "die ...; exit 2" sequence?
Show 15 quoted lines
> @@ -45,6 +45,17 @@ do
>  	    message_given=1
>  	fi
>  	;;
> +    -F)
> +	annotate=1
> +	shift
> +	if test "$#" = "0"; then
> +	    die "error: option -F needs an argument"
> +	    exit 2
> +	else
> +	    message="$(cat "$1")"
> +	    message_given=1
> +	fi
> +	;;

I know it was copied from Han-Wen's aabd7693, but was this somehow to catch the case where die can fail???

Previous: Johannes SchindelinNext: Shawn Pearce
Message 3 of 5 in “UI: git-tag should support -F as well”
  1. Han-Wen NienhuysDec 21, 2006
  2. git-tag: support -F <file> optionJohannes Schindelin, Dec 21, 2006
  3. Junio C HamanoDec 22, 2006
  4. Shawn PearceDec 22, 2006
  5. Johannes SchindelinDec 22, 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.