summaryrefslogtreecommitdiff
path: root/sequencer.c
diff options
context:
space:
mode:
authorLibravatar Phillip Wood <phillip.wood@dunelm.org.uk>2020-11-04 15:29:39 +0000
committerLibravatar Junio C Hamano <gitster@pobox.com>2020-11-04 14:10:41 -0800
commita2bb10d06db8a90920f1f518705a0bb9d39aa1db (patch)
treec1b76c4d2152805feda76957ee8c5dc892739bd4 /sequencer.c
parentrebase -i: use struct object_id rather than looking up commit (diff)
downloadtgif-a2bb10d06db8a90920f1f518705a0bb9d39aa1db.tar.xz
rebase -i: use struct object_id when writing state
Rather than passing a string around pass the struct object_id that the string was created from call oid_hex() when we write the file. Signed-off-by: Phillip Wood <phillip.wood@dunelm.org.uk> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'sequencer.c')
-rw-r--r--sequencer.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sequencer.c b/sequencer.c
index f79c3df861..2037f0ba66 100644
--- a/sequencer.c
+++ b/sequencer.c
@@ -2692,7 +2692,7 @@ static void write_strategy_opts(struct replay_opts *opts)
}
int write_basic_state(struct replay_opts *opts, const char *head_name,
- struct commit *onto, const char *orig_head)
+ struct commit *onto, const struct object_id *orig_head)
{
if (head_name)
write_file(rebase_path_head_name(), "%s\n", head_name);
@@ -2700,7 +2700,8 @@ int write_basic_state(struct replay_opts *opts, const char *head_name,
write_file(rebase_path_onto(), "%s\n",
oid_to_hex(&onto->object.oid));
if (orig_head)
- write_file(rebase_path_orig_head(), "%s\n", orig_head);
+ write_file(rebase_path_orig_head(), "%s\n",
+ oid_to_hex(orig_head));
if (opts->quiet)
write_file(rebase_path_quiet(), "%s", "");