From: Junio C Hamano Date: Wed, 23 Mar 2016 15:51:16 GMT Subject: Re: [PATCH] add option -n (--no-checkout) to git-worktree add Message-ID: In-Reply-To: <01020153a40588f3-5401ea3e-ece8-435c-a046-a5c1c1f92cd6-000000@eu-west-1.amazonses.com> Ray Zhang writes: > @@ -320,6 +323,7 @@ static int add(int ac, const char **av, const char *prefix) > OPT_STRING('B', NULL, &new_branch_force, N_("branch"), > N_("create or reset a branch")), > OPT_BOOL(0, "detach", &opts.detach, N_("detach HEAD at named commit")), > + OPT_BOOL('n', "no-checkout", &opts.no_checkout, N_("don't create a checkout")), This would allow --no-no-checkout, which is idiotic, wouldn't it? How about OPT_BOOL(0, "checkout", &opts.checkout, N_("populate the new working tree")) and set opts.checkout to true when initializing?