Skip to content

Commit ed4cf6e

Browse files
bk2204gitster
authored andcommitted
gitattributes: mark AsciiDoc files as LF-only
In a future commit, we'll move the AsciiDoc documentation files to the ".adoc" extension rather than the extension ".txt". We need these files to use only LF because they are read by generate-cmdlist.sh using the read builtin. If we allow CRLF here, the CR at the end of the line is treated as part of the synopsis, since a POSIX shell doesn't consider it special like LF. In that case, we generate synopsis strings in C that contain a CR, which the compiler does not like because it believes that the double quote string terminator is missing, and as a consequence, compilation fails. Because we rely on LF-only endings here to compile successfully and we want Git to continue to be able to compile on Windows, mark these files as LF-only in the .gitattributes file. Signed-off-by: brian m. carlson <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 97343c8 commit ed4cf6e

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
*.bat text eol=crlf
99
CODE_OF_CONDUCT.md -whitespace
1010
/Documentation/**/*.txt text eol=lf
11+
/Documentation/**/*.adoc text eol=lf
1112
/command-list.txt text eol=lf
1213
/GIT-VERSION-GEN text eol=lf
1314
/mergetools/* text eol=lf

0 commit comments

Comments
 (0)