From 507ceb22e8f2b53d47a729cab1095f7d521e23c8 Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Wed, 27 Nov 2024 23:06:04 +0100 Subject: Fix support for CRLF line endings (which git may actually produce on conflict marker lines) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- git-rediff.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/git-rediff.c b/git-rediff.c index f1b277b..7e0727b 100644 --- a/git-rediff.c +++ b/git-rediff.c @@ -113,7 +113,7 @@ line_is_marker(struct line *line, char marker_symbol, size_t conflict_marker_siz if (line->text[i] != marker_symbol) return 0; - return i == line->len || line->text[i] == ' ' || line->text[i] == '\n'; + return i == line->len || line->text[i] == ' ' || line->text[i] == '\n' || line->text[i] == '\r'; } static void -- cgit v1.2.3-70-g09d2