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
This commit is contained in:
Junio C Hamano
2023-04-17 18:05:13 -07:00
11 changed files with 115 additions and 179 deletions

View File

@@ -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;