completion: use __gitcomp_builtin in _git_branch

The new completable options are: --all --create-reflog --format= --ignore-case --quiet 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 c01b56a3a8a375e5473b2548fec55fa408f098e0
2 files changed +3 -7
builtin/branch.c
+1 -1
@@ -615,7 +615,7 @@ int cmd_branch(int argc, const char **argv, const char *prefix)
615 OPT_BOOL('l', "create-reflog", &reflog, N_("create the branch's reflog")),
616 OPT_BOOL(0, "edit-description", &edit_description,
617 N_("edit the description for the branch")),
618 - OPT__FORCE(&force, N_("force creation, move/rename, deletion"), 0),
618 + OPT__FORCE(&force, N_("force creation, move/rename, deletion"), PARSE_OPT_NOCOMPLETE),
619 OPT_MERGED(&filter, N_("print only branches that are merged")),
620 OPT_NO_MERGED(&filter, N_("print only branches that are not merged")),
621 OPT_COLUMN(0, "column", &colopts, N_("list branches in columns")),
contrib/completion/git-completion.bash
+2 -6
@@ -1220,12 +1220,8 @@ _git_branch ()
1220 __git_complete_refs --cur="${cur##--set-upstream-to=}"
1221 ;;
1222 --*)
1223 - __gitcomp "
1224 - --color --no-color --verbose --abbrev= --no-abbrev
1225 - --track --no-track --contains --no-contains --merged --no-merged
1226 - --set-upstream-to= --edit-description --list
1227 - --unset-upstream --delete --move --copy --remotes
1228 - --column --no-column --sort= --points-at
1223 + __gitcomp_builtin branch "--no-color --no-abbrev
1224 + --no-track --no-column
1225 "
1226 ;;
1227 *)