From: Eric Sunshine Date: Tue, 17 Apr 2018 00:21:58 GMT Subject: Re: [PATCH] worktree: accept -f as short for --force for removal Message-ID: In-Reply-To: <20180416221654.49454-1-sbeller@google.com> On Mon, Apr 16, 2018 at 6:16 PM, Stefan Beller wrote: > The force flag is very common in many commands and is commonly > abbreviated with '-f', so add that to worktree removal, too > > Signed-off-by: Stefan Beller > --- > diff --git a/builtin/worktree.c b/builtin/worktree.c > @@ -783,7 +783,7 @@ static int remove_worktree(int ac, const char **av, const char *prefix) > { > int force = 0; > struct option options[] = { > - OPT_BOOL(0, "force", &force, > + OPT_BOOL('f', "force", &force, > N_("force removing even if the worktree is dirty")), Should this be using OPT__FORCE, rather than OPT_BOOL, to be consistent with worktree.c:add()? Also, can you amend the commit message to mention that "git worktree remove -f" was already documented, and that it was only the implementation which was lacking? Thanks. > OPT_END() > };