summaryrefslogtreecommitdiff
path: root/sequencer.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2018-07-18 19:20:33 (GMT)
committerJunio C Hamano <gitster@pobox.com>2018-07-18 19:20:33 (GMT)
commitb345b77b3a10dc94c2130669ce27bf61eddaabee (patch)
treea56cd02df9e9473611617cb2a4646975478932a0 /sequencer.c
parent676c7e50b10f1fbb2ce06e46260f15f3a20679f7 (diff)
parentd7f590be8409363afad51519d3060188d33fb775 (diff)
downloadgit-b345b77b3a10dc94c2130669ce27bf61eddaabee.zip
git-b345b77b3a10dc94c2130669ce27bf61eddaabee.tar.gz
git-b345b77b3a10dc94c2130669ce27bf61eddaabee.tar.bz2
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.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/sequencer.c b/sequencer.c
index 39363a9..03c4740 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];