diff options
author | Phillip Wood <phillip.wood@dunelm.org.uk> | 2020-11-04 15:29:39 +0000 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2020-11-04 14:10:41 -0800 |
commit | a2bb10d06db8a90920f1f518705a0bb9d39aa1db (patch) | |
tree | c1b76c4d2152805feda76957ee8c5dc892739bd4 /builtin | |
parent | rebase -i: use struct object_id rather than looking up commit (diff) | |
download | tgif-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 'builtin')
-rw-r--r-- | builtin/rebase.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/builtin/rebase.c b/builtin/rebase.c index 4e4a5e774e..28e7b7f5ce 100644 --- a/builtin/rebase.c +++ b/builtin/rebase.c @@ -296,7 +296,8 @@ static int get_revision_ranges(struct commit *upstream, struct commit *onto, } static int init_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) { FILE *interactive; @@ -340,7 +341,7 @@ static int do_interactive_rebase(struct rebase_options *opts, unsigned flags) if (init_basic_state(&replay, opts->head_name ? opts->head_name : "detached HEAD", - opts->onto, head_hash)) { + opts->onto, &opts->orig_head)) { free(revisions); free(shortrevisions); |