Skip to content

Commit 1b35475

Browse files
pcloudsgitster
authored andcommitted
completion: use __gitcomp_builtin in _git_replace
The new completable option is --raw. Signed-off-by: Nguyễn Thái Ngọc Duy <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent ebc4a04 commit 1b35475

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

builtin/replace.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -439,7 +439,8 @@ int cmd_replace(int argc, const char **argv, const char *prefix)
439439
OPT_CMDMODE('d', "delete", &cmdmode, N_("delete replace refs"), MODE_DELETE),
440440
OPT_CMDMODE('e', "edit", &cmdmode, N_("edit existing object"), MODE_EDIT),
441441
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),
443444
OPT_BOOL(0, "raw", &raw, N_("do not pretty-print contents for --edit")),
444445
OPT_STRING(0, "format", &format, N_("format"), N_("use this format")),
445446
OPT_END()

contrib/completion/git-completion.bash

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2661,7 +2661,7 @@ _git_replace ()
26612661
{
26622662
case "$cur" in
26632663
--*)
2664-
__gitcomp "--edit --graft --format= --list --delete"
2664+
__gitcomp_builtin replace
26652665
return
26662666
;;
26672667
esac

0 commit comments

Comments
 (0)