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

4 messages from 2018-08-15 to 2018-08-15. Participants: Johannes Schindelin via GitGitGadget, Junio C Hamano, Eric Sunshine.
Thread: https://gitlist.dev/t/49132

## Johannes Schindelin via GitGitGadget, 2018-08-15 14:33

Subject: [PATCH 0/1] Fix make -C t chainlint with DOS line endings
Message-ID: <pull.19.git.gitgitgadget@gmail.com>
URL: https://gitlist.dev/e/pull.19.git.gitgitgadget%40gmail.com

```
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, 2018-08-15 14:33

Subject: [PATCH 1/1] chainlint: fix for core.autocrlf=true
Message-ID: <d0d1d49d6f3e741e9c048041a2f467742bce4bdc.1534343621.git.gitgitgadget@gmail.com>
URL: https://gitlist.dev/e/d0d1d49d6f3e741e9c048041a2f467742bce4bdc.1534343621.git.gitgitgadget%40gmail.com
In-Reply-To: <pull.19.git.gitgitgadget@gmail.com>

```
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(+)

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, 2018-08-15 16:31

Subject: Re: [PATCH 1/1] chainlint: fix for core.autocrlf=true
Message-ID: <xmqqmutnk2vv.fsf@gitster-ct.c.googlers.com>
URL: https://gitlist.dev/e/xmqqmutnk2vv.fsf%40gitster-ct.c.googlers.com
In-Reply-To: <d0d1d49d6f3e741e9c048041a2f467742bce4bdc.1534343621.git.gitgitgadget@gmail.com>

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

> 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.

>
> 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, 2018-08-15 16:32

Subject: Re: [PATCH 1/1] chainlint: fix for core.autocrlf=true
Message-ID: <CAPig+cQkHiKDUhMJEdOewnEHTiTvdULwhZGd_h_94W0+zzGb0Q@mail.gmail.com>
URL: https://gitlist.dev/e/CAPig%2BcQkHiKDUhMJEdOewnEHTiTvdULwhZGd_h_94W0%2BzzGb0Q%40mail.gmail.com
In-Reply-To: <d0d1d49d6f3e741e9c048041a2f467742bce4bdc.1534343621.git.gitgitgadget@gmail.com>

```
On Wed, Aug 15, 2018 at 10:33 AM Johannes Schindelin via GitGitGadget
<gitgitgadget@gmail.com> wrote:
> 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.

```
