threads / patch / 49132

patchFix make -C t chainlint with DOS line endings

Subject: [PATCH 0/1] Fix make -C t chainlint with DOS line endings

## tl;dr

4 messages between Aug 15, 2018 and Aug 15, 2018. Diffs are folded; open one to read it.

replies: 3people: 3as markdown or json

Johannes Schindelin via GitGitGadget· Aug 15, 2018, 14:33 UTC · lore

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
-- 
gitgitgadget
Johannes Schindelin via GitGitGadget· Aug 15, 2018, 14:33 UTC · re: Johannes Schindelin via GitGitGadget · lore

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

From: Johannes Schindelin <johannes.schindelin@gmx.de>

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.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
---
 t/.gitattributes | 1 +
 1 file changed, 1 insertion(+)
Show changes to t/.gitattributes +1 −0
diff --git a/t/.gitattributes b/t/.gitattributes
index 3bd959ae5..9d09df5a6 100644
--- a/t/.gitattributes
+++ b/t/.gitattributes
@@ -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
-- 
gitgitgadget
Junio C Hamano· Aug 15, 2018, 16:31 UTC · re: Johannes Schindelin via GitGitGadget · lore

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

"Johannes Schindelin via GitGitGadget" <gitgitgadget@gmail.com> writes:

Show 11 quoted lines
> From: Johannes Schindelin <johannes.schindelin@gmx.de>
>
> 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.
>
> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
> ---
>  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.
Show 11 quoted lines
>
> diff --git a/t/.gitattributes b/t/.gitattributes
> index 3bd959ae5..9d09df5a6 100644
> --- a/t/.gitattributes
> +++ b/t/.gitattributes
> @@ -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
Eric Sunshine· Aug 15, 2018, 16:32 UTC · re: Johannes Schindelin via GitGitGadget · lore

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

On Wed, Aug 15, 2018 at 10:33 AM Johannes Schindelin via GitGitGadget <gitgitgadget@gmail.com> wrote:

Show 10 quoted lines
> 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.
>
> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
> ---
> diff --git a/t/.gitattributes b/t/.gitattributes
> @@ -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.

← back to recent threads