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

Re: [PATCH (BUGFIX)] Respect core.autocrlf in combined diff

From
Junio C Hamano <gitster@pobox.com>
Date
Aug 24, 2008, 01:24 UTC
Message-ID
<7vy72nurw0.fsf@gitster.siamese.dyndns.org>
In-Reply-To
<200808232321.21795.angavrilov@gmail.com>
Alexander Gavrilov <angavrilov@gmail.com> writes:
Show 6 quoted lines
> 		...
> 		git commit -m aaa
> 		git config core.autocrlf true
> 		git merge b
>
> 	Then look at the output of git diff.
Come to think of it, this test sequence is totally bogus, isn't it?

After making the "aaa" commit, you change core.autocrlf setting, which means that at that point your work tree is invalid and needs to be checked out with the right crlf.

IOW, shouldn't you need to do something like this:
 		git commit -m aaa
 		git config core.autocrlf true
+		rm -f .git/index && git reset --hard
		git merge b

for the test sequence to be a valid one that (may or may not) exposes the problem you are trying to solve?

Previous: Junio C HamanoNext: Alexander Gavrilov
Message 3 of 4 in “Respect core.autocrlf in combined diff”
  1. Respect core.autocrlf in combined diffAlexander Gavrilov, Aug 23, 2008
  2. Junio C HamanoAug 24, 2008
  3. Junio C HamanoAug 24, 2008
  4. Alexander GavrilovAug 24, 2008

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.