]> git.ipfire.org Git - thirdparty/git.git/blobdiff - sequencer.h
sequencer: use struct strvec to store merge strategy options
[thirdparty/git.git] / sequencer.h
index 33dbaf5b66d8bd803de8b0dfdc7d25300ed62ede..8a79d6b200e86d4b28ff8c6a1e5d91af60aca768 100644 (file)
@@ -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