Skip to content

Commit 9084712

Browse files
authored
Merge pull request libgit2#4904 from libgit2/ethomson/crlf
Update CRLF filtering to match modern git
2 parents 77f1460 + e385e64 commit 9084712

File tree

7,654 files changed

+33402
-238
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

7,654 files changed

+33402
-238
lines changed

src/buf_text.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -310,6 +310,7 @@ bool git_buf_text_gather_stats(
310310
}
311311
}
312312

313-
return (stats->nul > 0 ||
313+
/* Treat files with a bare CR as binary */
314+
return (stats->cr != stats->crlf || stats->nul > 0 ||
314315
((stats->printable >> 7) < stats->nonprintable));
315316
}

0 commit comments

Comments
 (0)