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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



"Luis R. Rodriguez" <mcgrof@xxxxxxxxxxxxxxxx> writes:

> From: "Luis R. Rodriguez" <mcgrof@xxxxxxxx>
>
> This saves us a few branches when RUN_SETUP is set up.
>
> Signed-off-by: Luis R. Rodriguez <mcgrof@xxxxxxxx>
> ---

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

>  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);
>  		}
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]