Re: [PATCH] Use "--no-" prefix to switch off some of checkout dwimmery

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

 



Alex Riesen <raa.lkml@xxxxxxxxx> writes:

> The one which guesses local branch name from a remote reference.
>
> Signed-off-by: Alex Riesen <raa.lkml@xxxxxxxxx>
> ---
>
> Maybe like this?
>
> BTW, can parse-options take care of the " (default)" addition?
>
>  builtin-checkout.c |    4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/builtin-checkout.c b/builtin-checkout.c
> index 6ec9b83..22b023b 100644
> --- a/builtin-checkout.c
> +++ b/builtin-checkout.c
> @@ -632,8 +632,8 @@ int cmd_checkout(int argc, const char **argv, const char *prefix)
>  		OPT_STRING(0, "conflict", &conflict_style, "style",
>  			   "conflict style (merge or diff3)"),
>  		OPT_BOOLEAN('p', "patch", &patch_mode, "select hunks interactively"),
> -		OPT_SET_INT(0, "nodwim", &dwim_new_local_branch,
> -			    "do not dwim local branch creation", 0),
> +		OPT_SET_INT(0, "dwim", &dwim_new_local_branch,
> +			    "Guess local branch from remote reference (default)", 0),

Humph, how does SET_INT know to set it to 1 with --dwim and set it to 0
with --no-dwim?

>  		OPT_END(),
>  	};
>  	int has_dash_dash;
> -- 
> 1.6.5.1.50.g84e6e
--
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]