]> git.ipfire.org Git - thirdparty/git.git/commitdiff
completion: use __gitcomp_builtin in _git_replace
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>
Fri, 9 Feb 2018 11:02:13 +0000 (18:02 +0700)
committerJunio C Hamano <gitster@pobox.com>
Fri, 9 Feb 2018 18:24:52 +0000 (10:24 -0800)
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>
builtin/replace.c
contrib/completion/git-completion.bash

index 10078ae37136f154486d8163b6b905ad163c7047..0c1d8e1b081333b5f582dd42b5ef97101b54eb9e 100644 (file)
@@ -439,7 +439,8 @@ int cmd_replace(int argc, const char **argv, const char *prefix)
                OPT_CMDMODE('d', "delete", &cmdmode, N_("delete replace refs"), MODE_DELETE),
                OPT_CMDMODE('e', "edit", &cmdmode, N_("edit existing object"), MODE_EDIT),
                OPT_CMDMODE('g', "graft", &cmdmode, N_("change a commit's parents"), MODE_GRAFT),
-               OPT_BOOL('f', "force", &force, N_("replace the ref if it exists")),
+               OPT_BOOL_F('f', "force", &force, N_("replace the ref if it exists"),
+                          PARSE_OPT_NOCOMPLETE),
                OPT_BOOL(0, "raw", &raw, N_("do not pretty-print contents for --edit")),
                OPT_STRING(0, "format", &format, N_("format"), N_("use this format")),
                OPT_END()
index 6e600b7aa347a124af6febafb7e516f43aed4f2e..18c2ccece99553cab1c443eada270cad8735215f 100644 (file)
@@ -2661,7 +2661,7 @@ _git_replace ()
 {
        case "$cur" in
        --*)
-               __gitcomp "--edit --graft --format= --list --delete"
+               __gitcomp_builtin replace
                return
                ;;
        esac