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

Re: [PATCH/RFC] blame: CRLF in the working tree and LF in the repo

From
Stepan Kasal <kasal@ucw.cz>
Date
Apr 27, 2015, 06:11 UTC
Message-ID
<20150427061115.GB2766@camelia.ucw.cz>
In-Reply-To
<xmqqzj5uxhls.fsf@gitster.dls.corp.google.com>
Hello,
On Sun, Apr 26, 2015 at 10:31:11PM -0700, Junio C Hamano wrote:
> [...] the commit you are proposing to revert [4d4813a5]
> was a misguided attempt to "fix" a non issue, [...]

yes, it was this. So I propose to remove the whole commit, including the test case and add two new test cases.

Details:

Git does not support CRLF as the internal line separator. If you commit file in binary mode with CRLF, you are on your own.

If you then recode the file in the working tree to use LF, no wonder things break.

If you do it indirectly, by setting the file mode to "text", things break exactly the same way.

And that is the case that 4d4813a5 wanted to fix, cf the test case in it.

OTOH, the commit has broken the most recommended scenario for Windows: LF in the repo, CRLF in the work tree.

Thanks,
	Stepan
Previous: Junio C HamanoNext: Johannes Sixt
Message 5 of 16 in “blame: CRLF in the working tree and LF in the repo”
  1. blame: CRLF in the working tree and LF in the repoTorsten Bögershausen, Apr 26, 2015
  2. Eric SunshineApr 26, 2015
  3. Stepan KasalApr 27, 2015
  4. Junio C HamanoApr 27, 2015
  5. Stepan KasalApr 27, 2015
  6. Johannes SixtApr 27, 2015
  7. Torsten BögershausenApr 27, 2015
  8. Johannes SixtApr 28, 2015
  9. Junio C HamanoApr 28, 2015
  10. Johannes SixtApr 28, 2015
  11. Stepan KasalApr 28, 2015
  12. Junio C HamanoApr 27, 2015
  13. Torsten BögershausenApr 27, 2015
  14. Junio C HamanoApr 28, 2015
  15. Torsten BögershausenApr 28, 2015
  16. brian m. carlsonApr 28, 2015

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.