Skip to content

Commit 4ab867b

Browse files
phillipwoodgitster
authored andcommitted
rebase -i: fix reflog message
When rebase -i was converted to C a bug was introduced into the code that creates the reflog message. Instead of saying rebase -i (finish): <head-name> onto <onto> it says rebase -i (finish): <head-name> onto <orig-head><onto> as the strbuf is not reset between reading the value of <orig-head> and <onto>. Signed-off-by: Phillip Wood <[email protected]> Acked-by: Johannes Schindelin <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent a42e1b4 commit 4ab867b

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

sequencer.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2058,6 +2058,7 @@ static int pick_commits(struct todo_list *todo_list, struct replay_opts *opts)
20582058
res = error(_("could not read orig-head"));
20592059
goto cleanup_head_ref;
20602060
}
2061+
strbuf_reset(&buf);
20612062
if (!read_oneliner(&buf, rebase_path_onto(), 0)) {
20622063
res = error(_("could not read 'onto'"));
20632064
goto cleanup_head_ref;

0 commit comments

Comments
 (0)