Re: diff: should warn about EOL when --no-index ?
- From
Torsten Bögershausen <tboegi@web.de>
- Date
- Dec 3, 2025, 19:54 UTC
- Message-ID
- <20251203195424.GB13919@tb-raspi4>
- In-Reply-To
- <03643900-db0b-48b7-93a7-4d96632af57c@app.fastmail.com>
On Wed, Dec 03, 2025 at 05:26:49PM +0100, Kristoffer Haugsbakk wrote:
Show 13 quoted lines
> When using `git diff --no-index` on some CRLF files with my setup > and config: > > warning: in the working copy of '<something>.csv', CRLF will be replaced by LF the next time Git touches it > > To my mind, I’m saying that I don’t care about the working tree per > se. In particular, in this case, I’m just using git-diff(1) as a > difference utility on some non-Git files (this happens to be outside a > Git repository). > > -- > Kristoffer Haugsbakk >
Not being an expert in `git diff --no-index`: It seems as if Git reads the .gitconfig and possible .gitattributes here ? Or what exact setup do yoe use, what is the value for core.autocrlf and do you have a .gitattributes file ? Thinking about it: The warning may be not needed. On the other hand: It seems as if something in your repo is not as it should be ? Because the repo should be normalized ? And if it was, there would be no warning ?
What does git ls-files --eol give you ?
More information is welcome