Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohannes Schindelin <johannes.schindelin@gmx.de>2016-10-21 15:25:36 +0300
committerJunio C Hamano <gitster@pobox.com>2016-10-21 19:32:35 +0300
commit8f8550b3ece8742c75dc6a5296d1b82e52e09def (patch)
treea2db9f412d9d1bde2912aa746dac58e25f93486e /sequencer.c
parent0009426d6721a0356d41811aa34b4ac7f278a76e (diff)
sequencer: left-trim lines read from the script
Interactive rebase's scripts may be indented; we need to handle this case, too, now that we prepare the sequencer to process interactive rebases. Signed-off-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.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/sequencer.c b/sequencer.c
index 8646ca56ff..d74fdce99b 100644
--- a/sequencer.c
+++ b/sequencer.c
@@ -874,6 +874,9 @@ static int parse_insn_line(struct todo_item *item, const char *bol, char *eol)
char *end_of_object_name;
int i, saved, status, padding;
+ /* left-trim */
+ bol += strspn(bol, " \t");
+
for (i = 0; i < ARRAY_SIZE(todo_command_strings); i++)
if (skip_prefix(bol, todo_command_strings[i], &bol)) {
item->command = i;