Skip to contentSkip to conversation

Fix make -C t chainlint with DOS line endings

PATCH In review Johannes Schindelin via GitGitGadget 3 participants 4 messages Aug 15, 2018

lore
Share & tools
lore
#0 lore raw

cover Fix make -C t chainlint with DOS line endings

Historically, nobody paid attention to our own source code having correct Git attributes
[https://www.edwardthomson.com/blog/git_for_windows_line_endings.html] when it comes to line endings. Because historically, we had no good way to specify that ;-)

But now we do, and so we need to use it. Especially when it would break the build otherwise.

Johannes Schindelin (1):
chainlint: fix for core.autocrlf=true

 t/.gitattributes | 1 +
 1 file changed, 1 insertion(+)

base-commit: 1d89318c48d233d52f1db230cf622935ac3c69fa
Published-As: https://github.com/gitgitgadget/git/releases/tags/pr-19%2Fdscho%2Ffix-chainlint-on-windows-v1
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-19/dscho/fix-chainlint-on-windows-v1
Pull-Request: https://github.com/gitgitgadget/git/pull/19

Signature · 1 line
gitgitgadget
#1 lore raw

PATCH 1/1 chainlint: fix for core.autocrlf=true

From: Johannes Schindelin <[email protected]>

The chainlint target compares actual output to expected output, where the actual output is generated from files that are specifically checked out with LF-only line endings. So the expected output needs to be checked out with LF-only line endings, too.

---
 t/.gitattributes | 1 +
 1 file changed, 1 insertion(+)
t/.gitattributes +1 -0
index 3bd959ae5..9d09df5a6 100644
@@ -1,4 +1,5 @@
 t[0-9][0-9][0-9][0-9]/* -whitespace
+/chainlint/*.expect eol=lf
 /diff-lib/* eol=lf
 /t0110/url-* binary
 /t3900/*.txt eol=lf
Signature · 1 line
gitgitgadget
#2 lore raw

Re: [PATCH 1/1] chainlint: fix for core.autocrlf=true

"Johannes Schindelin via GitGitGadget" <[email protected]>

Quoted 11 lines · writes:

From: Johannes Schindelin <[email protected]>

The chainlint target compares actual output to expected output, where the actual output is generated from files that are specifically checked out with LF-only line endings. So the expected output needs to be checked out with LF-only line endings, too.

---
 t/.gitattributes | 1 +
 1 file changed, 1 insertion(+)

Good spotting. A help like this from those on different platforms than what the original author uses is the ideal model of how we collaborate together.

Will queue.

Quoted 11 lines
t/.gitattributes +1 -0
index 3bd959ae5..9d09df5a6 100644
@@ -1,4 +1,5 @@
 t[0-9][0-9][0-9][0-9]/* -whitespace
+/chainlint/*.expect eol=lf
 /diff-lib/* eol=lf
 /t0110/url-* binary
 /t3900/*.txt eol=lf
#3 lore raw

Re: [PATCH 1/1] chainlint: fix for core.autocrlf=true

In reply to Johannes Schindelin via GitGitGadget

t/.gitattributes line 1

Quoted 10 lines · Johannes Schindelin via GitGitGadget

The chainlint target compares actual output to expected output, where the actual output is generated from files that are specifically checked out with LF-only line endings. So the expected output needs to be checked out with LF-only line endings, too.

---

t/.gitattributes +1 -0
@@ -1,4 +1,5 @@
+/chainlint/*.expect eol=lf

Make sense. I did touch t/.gitignore for the chainlint series but never thought to examine t/.gitattributes (and wasn't necessarily aware of its existence). Had I looked inside .gitattributes, perhaps I would have intuited the need for this change. Thanks for handling it.