diff --git a/apply.c b/apply.c index 321a9fa68d..65eb37e6a4 100644 --- a/apply.c +++ b/apply.c @@ -4943,8 +4943,9 @@ int apply_parse_options(int argc, const char **argv, N_("make sure the patch is applicable to the current index")), OPT_BOOL(0, "cached", &state->cached, N_("apply a patch without touching the working tree")), - OPT_BOOL(0, "unsafe-paths", &state->unsafe_paths, - N_("accept a patch that touches outside the working area")), + OPT_BOOL_F(0, "unsafe-paths", &state->unsafe_paths, + N_("accept a patch that touches outside the working area"), + PARSE_OPT_NOCOMPLETE), OPT_BOOL(0, "apply", force_apply, N_("also apply the patch (use with --stat/--summary/--check)")), OPT_BOOL('3', "3way", &state->threeway, diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash index eba482eb9c..2fd3fc999e 100644 --- a/contrib/completion/git-completion.bash +++ b/contrib/completion/git-completion.bash @@ -1134,14 +1134,7 @@ _git_apply () return ;; --*) - __gitcomp " - --stat --numstat --summary --check --index - --cached --index-info --reverse --reject --unidiff-zero - --apply --no-add --exclude= - --ignore-whitespace --ignore-space-change - --whitespace= --inaccurate-eof --verbose - --recount --directory= - " + __gitcomp_builtin apply return esac }