Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2019-03-07 03:59:57 +0300
committerJunio C Hamano <gitster@pobox.com>2019-03-07 03:59:58 +0300
commitb0e7fb2e5cc70a03d75e41fe6b1bde6fdc0872c8 (patch)
treed07202c20257da961faf1f9a2d4852371c0289ca /builtin
parent4751a1673c7d4aeb1b6462f89fa7d86c05898d05 (diff)
parent5a59a2301f6ec9bcf1b101edb9ca33beb465842f (diff)
Merge branch 'nd/completion-more-parameters'
The command line completion (in contrib/) has been taught to complete more subcommand parameters. * nd/completion-more-parameters: completion: add more parameter value completion
Diffstat (limited to 'builtin')
-rw-r--r--builtin/am.c4
-rw-r--r--builtin/commit.c8
-rw-r--r--builtin/help.c4
-rw-r--r--builtin/log.c8
-rw-r--r--builtin/pull.c4
-rw-r--r--builtin/replace.c4
6 files changed, 32 insertions, 0 deletions
diff --git a/builtin/am.c b/builtin/am.c
index 86e33495b0..4fb107a9d1 100644
--- a/builtin/am.c
+++ b/builtin/am.c
@@ -2121,6 +2121,10 @@ static int parse_opt_patchformat(const struct option *opt, const char *arg, int
*opt_value = PATCH_FORMAT_HG;
else if (!strcmp(arg, "mboxrd"))
*opt_value = PATCH_FORMAT_MBOXRD;
+ /*
+ * Please update $__git_patchformat in git-completion.bash
+ * when you add new options
+ */
else
return error(_("Invalid value for --patch-format: %s"), arg);
return 0;
diff --git a/builtin/commit.c b/builtin/commit.c
index 8d7a613fda..f17537474a 100644
--- a/builtin/commit.c
+++ b/builtin/commit.c
@@ -1039,6 +1039,10 @@ static void handle_untracked_files_arg(struct wt_status *s)
s->show_untracked_files = SHOW_NORMAL_UNTRACKED_FILES;
else if (!strcmp(untracked_files_arg, "all"))
s->show_untracked_files = SHOW_ALL_UNTRACKED_FILES;
+ /*
+ * Please update $__git_untracked_file_modes in
+ * git-completion.bash when you add new options
+ */
else
die(_("Invalid untracked files mode '%s'"), untracked_files_arg);
}
@@ -1180,6 +1184,10 @@ static int parse_and_validate_options(int argc, const char *argv[],
else if (!strcmp(cleanup_arg, "scissors"))
cleanup_mode = use_editor ? COMMIT_MSG_CLEANUP_SCISSORS :
COMMIT_MSG_CLEANUP_SPACE;
+ /*
+ * Please update _git_commit() in git-completion.bash when you
+ * add new options.
+ */
else
die(_("Invalid cleanup mode %s"), cleanup_arg);
diff --git a/builtin/help.c b/builtin/help.c
index 7739a5c155..e5590d7787 100644
--- a/builtin/help.c
+++ b/builtin/help.c
@@ -70,6 +70,10 @@ static enum help_format parse_help_format(const char *format)
return HELP_FORMAT_INFO;
if (!strcmp(format, "web") || !strcmp(format, "html"))
return HELP_FORMAT_WEB;
+ /*
+ * Please update _git_config() in git-completion.bash when you
+ * add new help formats.
+ */
die(_("unrecognized help format '%s'"), format);
}
diff --git a/builtin/log.c b/builtin/log.c
index 57869267d8..ab859f5904 100644
--- a/builtin/log.c
+++ b/builtin/log.c
@@ -84,6 +84,10 @@ static int parse_decoration_style(const char *value)
return DECORATE_SHORT_REFS;
else if (!strcmp(value, "auto"))
return auto_decoration_style();
+ /*
+ * Please update _git_log() in git-completion.bash when you
+ * add new decoration styles.
+ */
return -1;
}
@@ -1228,6 +1232,10 @@ static int thread_callback(const struct option *opt, const char *arg, int unset)
*thread = THREAD_SHALLOW;
else if (!strcmp(arg, "deep"))
*thread = THREAD_DEEP;
+ /*
+ * Please update _git_formatpatch() in git-completion.bash
+ * when you add new options.
+ */
else
return 1;
return 0;
diff --git a/builtin/pull.c b/builtin/pull.c
index 701d1473dc..33db889955 100644
--- a/builtin/pull.c
+++ b/builtin/pull.c
@@ -56,6 +56,10 @@ static enum rebase_type parse_config_rebase(const char *key, const char *value,
return REBASE_MERGES;
else if (!strcmp(value, "interactive") || !strcmp(value, "i"))
return REBASE_INTERACTIVE;
+ /*
+ * Please update _git_config() in git-completion.bash when you
+ * add new rebase modes.
+ */
if (fatal)
die(_("Invalid value for %s: %s"), key, value);
diff --git a/builtin/replace.c b/builtin/replace.c
index 5b80b7f211..f5701629a8 100644
--- a/builtin/replace.c
+++ b/builtin/replace.c
@@ -82,6 +82,10 @@ static int list_replace_refs(const char *pattern, const char *format)
data.format = REPLACE_FORMAT_MEDIUM;
else if (!strcmp(format, "long"))
data.format = REPLACE_FORMAT_LONG;
+ /*
+ * Please update _git_replace() in git-completion.bash when
+ * you add new format
+ */
else
return error(_("invalid replace format '%s'\n"
"valid formats are 'short', 'medium' and 'long'"),