]> git.ipfire.org Git - thirdparty/git.git/commit - sequencer.c
sequencer: remember the onelines when parsing the todo file
authorJohannes Schindelin <johannes.schindelin@gmx.de>
Fri, 21 Oct 2016 12:25:00 +0000 (14:25 +0200)
committerJunio C Hamano <gitster@pobox.com>
Fri, 21 Oct 2016 16:32:34 +0000 (09:32 -0700)
commitc22f7dfb0c34da55390d820ff69b9568a3be4a46
tree05556de98957ed0c9e058f4bcd020a55510b0e79
parent2863584f5cf98c5f768e24f4841e3df14cbea59a
sequencer: remember the onelines when parsing the todo file

The `git-rebase-todo` file contains a list of commands. Most of those
commands have the form

<verb> <sha1> <oneline>

The <oneline> is displayed primarily for the user's convenience, as
rebase -i really interprets only the <verb> <sha1> part. However, there
are *some* places in interactive rebase where the <oneline> is used to
display messages, e.g. for reporting at which commit we stopped.

So let's just remember it when parsing the todo file; we keep a copy of
the entire todo file anyway (to write out the new `done` and
`git-rebase-todo` file just before processing each command), so all we
need to do is remember the begin offsets and lengths.

As we will have to parse and remember the command-line for `exec` commands
later, we do not call the field "oneline" but rather "arg" (and will reuse
that for exec's command-line).

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
sequencer.c