Skip to content

Commit 66fa6e8

Browse files
szedergitster
authored andcommitted
git.c: update NO_PARSEOPT markings
Our Bash completion script can complete --options for commands using parse-options even when that command doesn't have a dedicated completion function, but to do so the completion script must know which commands use parse-options and which don't. Therefore, commands not using parse-options are marked in 'git.c's command list with the NO_PARSEOPT flag. Update this list, and remove this flag from the commands that by now use parse-options. After this change we can TAB complete --options of the plumbing commands 'commit-tree', 'mailinfo' and 'mktag'. Signed-off-by: SZEDER Gábor <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 6a475b7 commit 66fa6e8

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

git.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -489,14 +489,14 @@ static int run_builtin(struct cmd_struct *p, int argc, const char **argv)
489489
static struct cmd_struct commands[] = {
490490
{ "add", cmd_add, RUN_SETUP | NEED_WORK_TREE },
491491
{ "am", cmd_am, RUN_SETUP | NEED_WORK_TREE },
492-
{ "annotate", cmd_annotate, RUN_SETUP | NO_PARSEOPT },
492+
{ "annotate", cmd_annotate, RUN_SETUP },
493493
{ "apply", cmd_apply, RUN_SETUP_GENTLY },
494494
{ "archive", cmd_archive, RUN_SETUP_GENTLY },
495495
{ "bisect--helper", cmd_bisect__helper, RUN_SETUP },
496496
{ "blame", cmd_blame, RUN_SETUP },
497497
{ "branch", cmd_branch, RUN_SETUP | DELAY_PAGER_CONFIG },
498498
{ "bugreport", cmd_bugreport, RUN_SETUP_GENTLY },
499-
{ "bundle", cmd_bundle, RUN_SETUP_GENTLY | NO_PARSEOPT },
499+
{ "bundle", cmd_bundle, RUN_SETUP_GENTLY },
500500
{ "cat-file", cmd_cat_file, RUN_SETUP },
501501
{ "check-attr", cmd_check_attr, RUN_SETUP },
502502
{ "check-ignore", cmd_check_ignore, RUN_SETUP | NEED_WORK_TREE },
@@ -514,7 +514,7 @@ static struct cmd_struct commands[] = {
514514
{ "column", cmd_column, RUN_SETUP_GENTLY },
515515
{ "commit", cmd_commit, RUN_SETUP | NEED_WORK_TREE },
516516
{ "commit-graph", cmd_commit_graph, RUN_SETUP },
517-
{ "commit-tree", cmd_commit_tree, RUN_SETUP | NO_PARSEOPT },
517+
{ "commit-tree", cmd_commit_tree, RUN_SETUP },
518518
{ "config", cmd_config, RUN_SETUP_GENTLY | DELAY_PAGER_CONFIG },
519519
{ "count-objects", cmd_count_objects, RUN_SETUP },
520520
{ "credential", cmd_credential, RUN_SETUP_GENTLY | NO_PARSEOPT },
@@ -553,7 +553,7 @@ static struct cmd_struct commands[] = {
553553
{ "ls-files", cmd_ls_files, RUN_SETUP },
554554
{ "ls-remote", cmd_ls_remote, RUN_SETUP_GENTLY },
555555
{ "ls-tree", cmd_ls_tree, RUN_SETUP },
556-
{ "mailinfo", cmd_mailinfo, RUN_SETUP_GENTLY | NO_PARSEOPT },
556+
{ "mailinfo", cmd_mailinfo, RUN_SETUP_GENTLY },
557557
{ "mailsplit", cmd_mailsplit, NO_PARSEOPT },
558558
{ "maintenance", cmd_maintenance, RUN_SETUP | NO_PARSEOPT },
559559
{ "merge", cmd_merge, RUN_SETUP | NEED_WORK_TREE },
@@ -566,7 +566,7 @@ static struct cmd_struct commands[] = {
566566
{ "merge-recursive-theirs", cmd_merge_recursive, RUN_SETUP | NEED_WORK_TREE | NO_PARSEOPT },
567567
{ "merge-subtree", cmd_merge_recursive, RUN_SETUP | NEED_WORK_TREE | NO_PARSEOPT },
568568
{ "merge-tree", cmd_merge_tree, RUN_SETUP },
569-
{ "mktag", cmd_mktag, RUN_SETUP | NO_PARSEOPT },
569+
{ "mktag", cmd_mktag, RUN_SETUP },
570570
{ "mktree", cmd_mktree, RUN_SETUP },
571571
{ "multi-pack-index", cmd_multi_pack_index, RUN_SETUP },
572572
{ "mv", cmd_mv, RUN_SETUP | NEED_WORK_TREE },

0 commit comments

Comments
 (0)