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

Re: [PATCH] git.c: treat RUN_SETUP_GENTLY and RUN_SETUP as mutually exclusive

From
Junio C Hamano <gitster@pobox.com>
Date
Apr 22, 2014, 19:37 UTC
Message-ID
<xmqqvbu140lh.fsf@gitster.dls.corp.google.com>
In-Reply-To
<1398127676-12311-1-git-send-email-mcgrof@do-not-panic.com>
"Luis R. Rodriguez" <mcgrof@do-not-panic.com> writes:
Show 6 quoted lines
> From: "Luis R. Rodriguez" <mcgrof@suse.com>
>
> This saves us a few branches when RUN_SETUP is set up.
>
> Signed-off-by: Luis R. Rodriguez <mcgrof@suse.com>
> ---

Makes sense, especially because there is no sane reason to set both bits on.

Show 16 quoted lines
>  git.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/git.c b/git.c
> index 9efd1a3..7780572 100644
> --- a/git.c
> +++ b/git.c
> @@ -290,7 +290,7 @@ static int run_builtin(struct cmd_struct *p, int argc, const char **argv)
>  	if (!help) {
>  		if (p->option & RUN_SETUP)
>  			prefix = setup_git_directory();
> -		if (p->option & RUN_SETUP_GENTLY) {
> +		else if (p->option & RUN_SETUP_GENTLY) {
>  			int nongit_ok;
>  			prefix = setup_git_directory_gently(&nongit_ok);
>  		}
Previous: Luis R. Rodriguez
Message 2 of 2 in “git.c: treat RUN_SETUP_GENTLY and RUN_SETUP as mutually exclusive”
  1. git.c: treat RUN_SETUP_GENTLY and RUN_SETUP as mutually exclusiveLuis R. Rodriguez, Apr 22, 2014
  2. Junio C HamanoApr 22, 2014

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.