]> git.ipfire.org Git - thirdparty/git.git/blobdiff - parse-options-cb.c
mingw: use lowercase includes for some Windows headers
[thirdparty/git.git] / parse-options-cb.c
index 2488e6c030eb5efa9ed72c0f67f6357f23077a88..a24521dee0fca3de6284a9c59cd3bd8cefdb4942 100644 (file)
@@ -1,11 +1,12 @@
 #include "git-compat-util.h"
 #include "parse-options.h"
 #include "branch.h"
-#include "cache.h"
 #include "commit.h"
 #include "color.h"
+#include "date.h"
 #include "environment.h"
 #include "gettext.h"
+#include "object-name.h"
 #include "string-list.h"
 #include "strvec.h"
 #include "oid-array.h"
@@ -210,6 +211,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;