completion: use __gitcomp_builtin in _git_apply
The new completable options are: --3way --allow-overlap --build-fake-ancestor= --directory --exclude --include --index-info is no longer completable but that's because it's renamed to --build-fake-ancestor in 26b2800768 (apply: get rid of --index-info in favor of --build-fake-ancestor - 2007-09-17) Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Nguyễn Thái Ngọc Duy committed
Feb 9, 2018 at 18:01 UTC
b8e9d6629426d2e955ffbf038a4386f5e0242be7
2 files changed
+4
-10
apply.c
+3
-2
@@ -4943,8 +4943,9 @@ int apply_parse_options(int argc, const char **argv,
4943
N_("make sure the patch is applicable to the current index")),
4944
OPT_BOOL(0, "cached", &state->cached,
4945
N_("apply a patch without touching the working tree")),
4946
- OPT_BOOL(0, "unsafe-paths", &state->unsafe_paths,
4947
- N_("accept a patch that touches outside the working area")),
4946
+ OPT_BOOL_F(0, "unsafe-paths", &state->unsafe_paths,
4947
+ N_("accept a patch that touches outside the working area"),
4948
+ PARSE_OPT_NOCOMPLETE),
4949
OPT_BOOL(0, "apply", force_apply,
4950
N_("also apply the patch (use with --stat/--summary/--check)")),
4951
OPT_BOOL('3', "3way", &state->threeway,
contrib/completion/git-completion.bash
+1
-8
@@ -1134,14 +1134,7 @@ _git_apply ()
1134
return
1135
;;
1136
--*)
1137
- __gitcomp "
1138
- --stat --numstat --summary --check --index
1139
- --cached --index-info --reverse --reject --unidiff-zero
1140
- --apply --no-add --exclude=
1141
- --ignore-whitespace --ignore-space-change
1142
- --whitespace= --inaccurate-eof --verbose
1143
- --recount --directory=
1144
- "
1137
+ __gitcomp_builtin apply
1138
return
1139
esac
1140
}