completion: add more parameter value completion

This adds value completion for a couple more paramters. To make it
easier to maintain these hard coded lists, add a comment at the original
list/code to remind people to update git-completion.bash too.

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Nguyễn Thái Ngọc Duy
2019-02-16 18:24:41 +07:00
committed by Junio C Hamano
parent 35ee755a8c
commit 5a59a2301f
18 changed files with 126 additions and 4 deletions

View File

@ -281,7 +281,10 @@ static int parse_fetch_recurse(const char *opt, const char *arg,
default:
if (!strcmp(arg, "on-demand"))
return RECURSE_SUBMODULES_ON_DEMAND;
/*
* Please update $__git_fetch_recurse_submodules in
* git-completion.bash when you add new options.
*/
if (die_on_error)
die("bad %s argument: %s", opt, arg);
else
@ -362,6 +365,10 @@ static int parse_push_recurse(const char *opt, const char *arg,
return RECURSE_SUBMODULES_CHECK;
else if (!strcmp(arg, "only"))
return RECURSE_SUBMODULES_ONLY;
/*
* Please update $__git_push_recurse_submodules in
* git-completion.bash when you add new modes.
*/
else if (die_on_error)
die("bad %s argument: %s", opt, arg);
else