]> git.ipfire.org Git - thirdparty/git.git/blobdiff - sequencer.c
sequencer: strip CR from the todo script
[thirdparty/git.git] / sequencer.c
index 145de786e14312add58b5df267963ac9193af09b..04fcfd893f6bcc5a0f54502c57f5fb61d17ea07e 100644 (file)
@@ -776,6 +776,9 @@ static int parse_insn_buffer(char *buf, struct todo_list *todo_list)
 
                next_p = *eol ? eol + 1 /* skip LF */ : eol;
 
+               if (p != eol && eol[-1] == '\r')
+                       eol--; /* strip Carriage Return */
+
                item = append_new_todo(todo_list);
                item->offset_in_buf = p - todo_list->buf.buf;
                if (parse_insn_line(item, p, eol)) {