summaryrefslogtreecommitdiffstats
path: root/sequencer.h
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2023-04-18 03:05:13 +0200
committerJunio C Hamano <gitster@pobox.com>2023-04-18 03:05:13 +0200
commit3c957e6d399452897209d90fc0528a77bb093df3 (patch)
tree9db9f2a1e962349bf90b350bf2d5244185fcfcb3 /sequencer.h
parentMerge branch 'cm/branch-delete-error-message-update' (diff)
parentrebase: remove a couple of redundant strategy tests (diff)
downloadgit-3c957e6d399452897209d90fc0528a77bb093df3.tar.xz
git-3c957e6d399452897209d90fc0528a77bb093df3.zip
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 'sequencer.h')
-rw-r--r--sequencer.h12
1 files changed, 8 insertions, 4 deletions
diff --git a/sequencer.h b/sequencer.h
index 33dbaf5b66..913a0f652d 100644
--- a/sequencer.h
+++ b/sequencer.h
@@ -2,6 +2,7 @@
#define SEQUENCER_H
#include "strbuf.h"
+#include "strvec.h"
#include "wt-status.h"
struct commit;
@@ -60,8 +61,7 @@ struct replay_opts {
/* Merge strategy */
char *default_strategy; /* from config options */
char *strategy;
- char **xopts;
- size_t xopts_nr, xopts_alloc;
+ struct strvec xopts;
/* Reflog */
char *reflog_action;
@@ -80,7 +80,12 @@ struct replay_opts {
/* Private use */
const char *reflog_message;
};
-#define REPLAY_OPTS_INIT { .edit = -1, .action = -1, .current_fixups = STRBUF_INIT }
+#define REPLAY_OPTS_INIT { \
+ .edit = -1, \
+ .action = -1, \
+ .current_fixups = STRBUF_INIT, \
+ .xopts = STRVEC_INIT, \
+}
/*
* Note that ordering matters in this enum. Not only must it match the mapping
@@ -247,7 +252,6 @@ int read_oneliner(struct strbuf *buf,
const char *path, unsigned flags);
int read_author_script(const char *path, char **name, char **email, char **date,
int allow_missing);
-void parse_strategy_opts(struct replay_opts *opts, char *raw_opts);
int write_basic_state(struct replay_opts *opts, const char *head_name,
struct commit *onto, const struct object_id *orig_head);
void sequencer_post_commit_cleanup(struct repository *r, int verbose);