diff options
author | Phillip Wood <phillip.wood@dunelm.org.uk> | 2017-05-18 11:02:32 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2017-05-20 18:24:25 +0900 |
commit | 4ab867b8fc8c19ae99c5414ffcbf57fb1609c94f (patch) | |
tree | a66c823bce3be4d9e83fdf67b1a9a63d394cabfa /sequencer.c | |
parent | a42e1b4194b02638ea4f590ac1e7d231274886d1 (diff) | |
download | git-4ab867b8fc8c19ae99c5414ffcbf57fb1609c94f.tar.gz |
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>
Diffstat (limited to 'sequencer.c')
-rw-r--r-- | sequencer.c | 1 |
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; |