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>2023-04-18 04:05:13 +0300
committerJunio C Hamano <gitster@pobox.com>2023-04-18 04:05:13 +0300
commit3c957e6d399452897209d90fc0528a77bb093df3 (patch)
tree9db9f2a1e962349bf90b350bf2d5244185fcfcb3 /parse-options-cb.c
parent66bf8f19439556da7cf1c8852d07b87257f2a7d9 (diff)
parent05106aa198cd0f8a5643556ac9f8a1dfdbdb5bdd (diff)
Merge branch 'pw/rebase-cleanup-merge-strategy-option-handling'
Clean-up of the code path that deals with merge strategy option handling in "git rebase". * pw/rebase-cleanup-merge-strategy-option-handling: rebase: remove a couple of redundant strategy tests rebase -m: fix serialization of strategy options rebase -m: cleanup --strategy-option handling sequencer: use struct strvec to store merge strategy options rebase: stop reading and writing unnecessary strategy state
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 2488e6c030..10f2f75e83 100644
--- a/parse-options-cb.c
+++ b/parse-options-cb.c
@@ -210,6 +210,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;