Merge branch 'sb/worktree-remove-opt-force'

"git worktree remove" learned that "-f" is a shorthand for
"--force" option, just like for "git worktree add".

* sb/worktree-remove-opt-force:
  worktree: accept -f as short for --force for removal
This commit is contained in:
Junio C Hamano
2018-05-08 15:59:24 +09:00
2 changed files with 4 additions and 3 deletions

View File

@ -783,8 +783,9 @@ static int remove_worktree(int ac, const char **av, const char *prefix)
{
int force = 0;
struct option options[] = {
OPT_BOOL(0, "force", &force,
N_("force removing even if the worktree is dirty")),
OPT__FORCE(&force,
N_("force removing even if the worktree is dirty"),
PARSE_OPT_NOCOMPLETE),
OPT_END()
};
struct worktree **worktrees, *wt;