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

Re: [PATCH] remote: in case of error don't show success message.

From
Junio C Hamano <gitster@pobox.com>
Date
Sep 17, 2020, 18:39 UTC
Message-ID
<xmqqpn6kqmco.fsf@gitster.c.googlers.com>
In-Reply-To
<pull.848.git.git.1600356459092.gitgitgadget@gmail.com>

"Christian Schlack via GitGitGadget" <gitgitgadget@gmail.com> writes:

Show 14 quoted lines
> diff --git a/builtin/remote.c b/builtin/remote.c
> index 542f56e387..64b4b551eb 100644
> --- a/builtin/remote.c
> +++ b/builtin/remote.c
> @@ -1356,7 +1356,7 @@ static int set_head(int argc, const char **argv)
>  			result |= error(_("Not a valid ref: %s"), buf2.buf);
>  		else if (create_symref(buf.buf, buf2.buf, "remote set-head"))
>  			result |= error(_("Could not setup %s"), buf.buf);
> -		if (opt_a)
> +		else if (opt_a)
>  			printf("%s/HEAD set to %s\n", argv[0], head_name);
>  		free(head_name);
>  	}
>
Quite straight-forward and looks obviously good.
Thanks, will queue.
Previous: Christian Schlack via GitGitGadget
Message 2 of 2 in “remote: in case of error don't show success message.”
  1. remote: in case of error don't show success message.Christian Schlack via GitGitGadget, Sep 17, 2020
  2. Junio C HamanoSep 17, 2020

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.