git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH v2 1/2] .gitattributes: ensure t/oid-info/* has eol=lf

From
Johannes Schindelin <johannes.schindelin@gmx.de>
Date
Dec 14, 2018, 11:10 UTC
Message-ID
<nycvar.QRO.7.76.6.1812141204040.43@tvgsbejvaqbjf.bet>
In-Reply-To
<20181214005101.GT890086@genre.crustytoothpaste.net>
Hi Brian,
On Fri, 14 Dec 2018, brian m. carlson wrote:
Show 14 quoted lines
> On Wed, Dec 12, 2018 at 10:14:53AM -0800, Derrick Stolee via GitGitGadget wrote:
> > 
> > diff --git a/.gitattributes b/.gitattributes
> > index acf853e029..3738cea7eb 100644
> > --- a/.gitattributes
> > +++ b/.gitattributes
> > @@ -13,3 +13,4 @@
> >  /Documentation/gitk.txt conflict-marker-size=32
> >  /Documentation/user-manual.txt conflict-marker-size=32
> >  /t/t????-*.sh conflict-marker-size=32
> > +/t/oid-info/* eol=lf
> 
> Yeah, this seems like a sensible thing to do. I assumed the shell on
> Windows would read data as text files, not as binary files.

This is a tricky thing right there. The Bash we use is borrowed from the MSYS2 project, which tries to stay as close to Unix/Linux as possible, i.e. it does *not* treat Carriage Return as part of the line ending. Changing that default would break tons of things, I would expect.

> It's kinda hard for me as a non-Windows user to predict what will need
> CRLF endings and what will need LF endings with Git on Windows.

Right. It is my hope that I get the Azure Pipelines support going soon, so that Pull Requests on GitHub are tested on Windows, too. Hopefully that would help.

Typically, I monitor the Windows builds of `pu` closely. But in this case, it did not catch because the current Azure Pipeline that runs these tests (triggered via Travis) specifically forces `core.autocrlf` to `false`, as that definition pre-dates the work I've done to make Git's source code CR/LF safe.

I do have a build definition to test with `core.autocrlf = true`, but that only runs on Git for Windows' `master`, and once git.git has its own Azure Pipeline, I plan on adding another phase to test that directly.

Ciao, Dscho

Previous: brian m. carlsonNext: Johannes Schindelin via GitGitGadget
Message 14 of 16 in “.gitattributes: ensure t/oid-info/* has eol=lf”
  1. 0/1 .gitattributes: ensure t/oid-info/* has eol=lfDerrick Stolee via GitGitGadget, Dec 11, 2018
  2. 1/1 .gitattributes: ensure t/oid-info/* has eol=lfDerrick Stolee via GitGitGadget, Dec 11, 2018
  3. SZEDER GáborDec 12, 2018
  4. Johannes SchindelinDec 13, 2018
  5. SZEDER GáborDec 13, 2018
  6. Johannes SchindelinDec 13, 2018
  7. Junio C HamanoDec 12, 2018
  8. 0/2 Add more eol=lf to .gitattributesDerrick Stolee via GitGitGadget, Dec 12, 2018
  9. 1/2 .gitattributes: ensure t/oid-info/* has eol=lfDerrick Stolee via GitGitGadget, Dec 12, 2018
  10. Junio C HamanoDec 13, 2018
  11. Derrick StoleeDec 13, 2018
  12. Junio C HamanoDec 14, 2018
  13. brian m. carlsonDec 14, 2018
  14. Johannes SchindelinDec 14, 2018
  15. 2/2 t4256: mark support files as LF-onlyJohannes Schindelin via GitGitGadget, Dec 12, 2018
  16. Junio C HamanoDec 13, 2018

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.