diff options
author | Junio C Hamano <gitster@pobox.com> | 2018-07-18 12:20:33 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2018-07-18 12:20:33 -0700 |
commit | b345b77b3a10dc94c2130669ce27bf61eddaabee (patch) | |
tree | a56cd02df9e9473611617cb2a4646975478932a0 /sequencer.c | |
parent | 676c7e50b10f1fbb2ce06e46260f15f3a20679f7 (diff) | |
parent | d7f590be8409363afad51519d3060188d33fb775 (diff) | |
download | git-b345b77b3a10dc94c2130669ce27bf61eddaabee.tar.gz |
Merge branch 'en/rebase-i-microfixes'
* en/rebase-i-microfixes:
git-rebase--merge: modernize "git-$cmd" to "git $cmd"
Fix use of strategy options with interactive rebases
t3418: add testcase showing problems with rebase -i and strategy options
Diffstat (limited to 'sequencer.c')
-rw-r--r-- | sequencer.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/sequencer.c b/sequencer.c index 39363a950f..03c47405fb 100644 --- a/sequencer.c +++ b/sequencer.c @@ -2207,6 +2207,7 @@ static int populate_opts_cb(const char *key, const char *value, void *data) static void read_strategy_opts(struct replay_opts *opts, struct strbuf *buf) { int i; + char *strategy_opts_string; strbuf_reset(buf); if (!read_oneliner(buf, rebase_path_strategy(), 0)) @@ -2215,7 +2216,11 @@ static void read_strategy_opts(struct replay_opts *opts, struct strbuf *buf) if (!read_oneliner(buf, rebase_path_strategy_opts(), 0)) return; - opts->xopts_nr = split_cmdline(buf->buf, (const char ***)&opts->xopts); + strategy_opts_string = buf->buf; + if (*strategy_opts_string == ' ') + strategy_opts_string++; + opts->xopts_nr = split_cmdline(strategy_opts_string, + (const char ***)&opts->xopts); for (i = 0; i < opts->xopts_nr; i++) { const char *arg = opts->xopts[i]; |