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:
Diffstat (limited to 'parse-options-cb.c')
-rw-r--r--parse-options-cb.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/parse-options-cb.c b/parse-options-cb.c
index d346dbe210..8eb96c5ca9 100644
--- a/parse-options-cb.c
+++ b/parse-options-cb.c
@@ -208,6 +208,22 @@ int parse_opt_string_list(const struct option *opt, const char *arg, int unset)
return 0;
}
+int parse_opt_strvec(const struct option *opt, const char *arg, int unset)
+{
+ struct strvec *v = opt->value;
+
+ if (unset) {
+ strvec_clear(v);
+ return 0;
+ }
+
+ if (!arg)
+ return -1;
+
+ strvec_push(v, arg);
+ return 0;
+}
+
int parse_opt_noop_cb(const struct option *opt, const char *arg, int unset)
{
return 0;