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:
commit
90186fa057
@ -14,7 +14,7 @@ SYNOPSIS
|
||||
'git worktree lock' [--reason <string>] <worktree>
|
||||
'git worktree move' <worktree> <new-path>
|
||||
'git worktree prune' [-n] [-v] [--expire <expire>]
|
||||
'git worktree remove' [--force] <worktree>
|
||||
'git worktree remove' [-f] <worktree>
|
||||
'git worktree unlock' <worktree>
|
||||
|
||||
DESCRIPTION
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user