summaryrefslogtreecommitdiff
path: root/builtin
diff options
context:
space:
mode:
authorLibravatar Phillip Wood <phillip.wood@dunelm.org.uk>2020-11-04 15:29:38 +0000
committerLibravatar Junio C Hamano <gitster@pobox.com>2020-11-04 14:10:41 -0800
commitf3e27a02d598084a0ef5c8dd6b410bd6a5c5299f (patch)
tree9d85937d9d4cc649fa862b0d11cda79044d7bc7c /builtin
parentrebase -i: stop overwriting ORIG_HEAD buffer (diff)
downloadtgif-f3e27a02d598084a0ef5c8dd6b410bd6a5c5299f.tar.xz
rebase -i: use struct object_id rather than looking up commit
We already have a struct object_id containing the oid that we want to set ORIG_HEAD to so use that rather than converting it to a string and then calling get_oid() on that string. Signed-off-by: Phillip Wood <phillip.wood@dunelm.org.uk> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin')
-rw-r--r--builtin/rebase.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/builtin/rebase.c b/builtin/rebase.c
index cd101b2559..4e4a5e774e 100644
--- a/builtin/rebase.c
+++ b/builtin/rebase.c
@@ -370,8 +370,9 @@ static int do_interactive_rebase(struct rebase_options *opts, unsigned flags)
split_exec_commands(opts->cmd, &commands);
ret = complete_action(the_repository, &replay, flags,
- shortrevisions, opts->onto_name, opts->onto, head_hash,
- &commands, opts->autosquash, &todo_list);
+ shortrevisions, opts->onto_name, opts->onto,
+ &opts->orig_head, &commands, opts->autosquash,
+ &todo_list);
}
string_list_clear(&commands, 0);