summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLibravatar Phillip Wood <phillip.wood@dunelm.org.uk>2017-05-18 11:02:32 +0100
committerLibravatar Junio C Hamano <gitster@pobox.com>2017-05-20 18:24:25 +0900
commit4ab867b8fc8c19ae99c5414ffcbf57fb1609c94f (patch)
treea66c823bce3be4d9e83fdf67b1a9a63d394cabfa
parentsequencer: fix missing newline (diff)
downloadtgif-4ab867b8fc8c19ae99c5414ffcbf57fb1609c94f.tar.xz
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>
-rw-r--r--sequencer.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/sequencer.c b/sequencer.c
index d76dc9cb2b..907319d089 100644
--- a/sequencer.c
+++ b/sequencer.c
@@ -2058,6 +2058,7 @@ cleanup_head_ref:
res = error(_("could not read orig-head"));
goto cleanup_head_ref;
}
+ strbuf_reset(&buf);
if (!read_oneliner(&buf, rebase_path_onto(), 0)) {
res = error(_("could not read 'onto'"));
goto cleanup_head_ref;