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

Re: [PATCH] bisect run: die if no command is given

From
Junio C Hamano <gitster@pobox.com>
Date
Nov 13, 2017, 03:59 UTC
Message-ID
<xmqqefp2akww.fsf@gitster.mtv.corp.google.com>
In-Reply-To
<20171112205533.9593-1-s-beyer@gmx.net>
Stephan Beyer <s-beyer@gmx.net> writes:
Show 10 quoted lines
> It was possible to invoke "git bisect run" without any command.
> This considers all commits as good commits since "$@"'s return
> value for empty $@ is 0.
>
> This is most probably not what a user wants (otherwise she would
> invoke "git bisect run true"), so not providing a command now
> results in an error.
>
> Signed-off-by: Stephan Beyer <s-beyer@gmx.net>
> ---
Makes sense to me.  Thanks, will queue.
Show 16 quoted lines
>  git-bisect.sh | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/git-bisect.sh b/git-bisect.sh
> index 0138a8860..a69e43656 100755
> --- a/git-bisect.sh
> +++ b/git-bisect.sh
> @@ -450,6 +450,8 @@ bisect_replay () {
>  bisect_run () {
>  	bisect_next_check fail
>  
> +	test -n "$*" || die "$(gettext "bisect run failed: no command provided.")"
> +
>  	while true
>  	do
>  		command="$@"
Previous: Stephan Beyer
Message 2 of 2 in “bisect run: die if no command is given”
  1. bisect run: die if no command is givenStephan Beyer, Nov 12, 2017
  2. Junio C HamanoNov 13, 2017

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.