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 <phillip.wood@dunelm.org.uk> Acked-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Phillip Wood committed May 18, 2017 at 11:02 UTC 4ab867b8fc8c19ae99c5414ffcbf57fb1609c94f
1 file changed +1
sequencer.c
+1
@@ -2058,6 +2058,7 @@ cleanup_head_ref:
2058 res = error(_("could not read orig-head"));
2059 goto cleanup_head_ref;
2060 }
2061 + strbuf_reset(&buf);
2062 if (!read_oneliner(&buf, rebase_path_onto(), 0)) {
2063 res = error(_("could not read 'onto'"));
2064 goto cleanup_head_ref;