diff options
author | Elijah Newren <newren@gmail.com> | 2020-02-15 22:36:29 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2020-02-17 00:40:42 +0100 |
commit | 93122c985a3671bd4e15b3dbc6b457c981eb8c23 (patch) | |
tree | 5944be3ef00ab57c29f78a2e54e8196c76751b43 /builtin/rebase.c | |
parent | rebase: make sure to pass along the quiet flag to the sequencer (diff) | |
download | git-93122c985a3671bd4e15b3dbc6b457c981eb8c23.tar.xz git-93122c985a3671bd4e15b3dbc6b457c981eb8c23.zip |
rebase: fix handling of restrict_revision
restrict_revision in the original shell script was an excluded revision
range. It is also treated that way by the am-backend. In the
conversion from shell to C (see commit 6ab54d17be3f ("rebase -i:
implement the logic to initialize $revisions in C", 2018-08-28)), the
interactive-backend accidentally treated it as a positive revision
rather than a negated one.
This was missed as there were no tests in the testsuite that tested an
interactive rebase with fork-point behavior.
Signed-off-by: Elijah Newren <newren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/rebase.c')
-rw-r--r-- | builtin/rebase.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/builtin/rebase.c b/builtin/rebase.c index 1a664137d2..8264a9243f 100644 --- a/builtin/rebase.c +++ b/builtin/rebase.c @@ -348,8 +348,8 @@ static int do_interactive_rebase(struct rebase_options *opts, unsigned flags) argv_array_pushl(&make_script_args, "", revisions, NULL); if (opts->restrict_revision) - argv_array_push(&make_script_args, - oid_to_hex(&opts->restrict_revision->object.oid)); + argv_array_pushf(&make_script_args, "^%s", + oid_to_hex(&opts->restrict_revision->object.oid)); ret = sequencer_make_script(the_repository, &todo_list.buf, make_script_args.argc, make_script_args.argv, |