completion: use __gitcomp_builtin in _git_replace

The new completable option is --raw. 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:02 UTC 1b35475546995edfdb4c56bbbef9a5dac7974ffb
2 files changed +3 -2
builtin/replace.c
+2 -1
@@ -439,7 +439,8 @@ int cmd_replace(int argc, const char **argv, const char *prefix)
439 OPT_CMDMODE('d', "delete", &cmdmode, N_("delete replace refs"), MODE_DELETE),
440 OPT_CMDMODE('e', "edit", &cmdmode, N_("edit existing object"), MODE_EDIT),
441 OPT_CMDMODE('g', "graft", &cmdmode, N_("change a commit's parents"), MODE_GRAFT),
442 - OPT_BOOL('f', "force", &force, N_("replace the ref if it exists")),
442 + OPT_BOOL_F('f', "force", &force, N_("replace the ref if it exists"),
443 + PARSE_OPT_NOCOMPLETE),
444 OPT_BOOL(0, "raw", &raw, N_("do not pretty-print contents for --edit")),
445 OPT_STRING(0, "format", &format, N_("format"), N_("use this format")),
446 OPT_END()
contrib/completion/git-completion.bash
+1 -1
@@ -2661,7 +2661,7 @@ _git_replace ()
2661 {
2662 case "$cur" in
2663 --*)
2664 - __gitcomp "--edit --graft --format= --list --delete"
2664 + __gitcomp_builtin replace
2665 return
2666 ;;
2667 esac