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

Re: Consequences of CRLF in index?

From
Lars Schneider <larsxschneider@gmail.com>
Date
Oct 25, 2017, 17:04 UTC
Message-ID
<07309D89-F536-4DA8-9214-B605007845C6@gmail.com>
In-Reply-To
<20171024181415.3tvmc36aqi335v66@aiede.mtv.corp.google.com>
Show 33 quoted lines
> On 24 Oct 2017, at 20:14, Jonathan Nieder <jrnieder@gmail.com> wrote:
> 
> Hi,
> 
> Lars Schneider wrote:
> 
>> I've migrated a large repo (110k+ files) with a lot of history (177k commits)
>> and a lot of users (200+) to Git. Unfortunately, all text files in the index
>> of the repo have CRLF line endings. In general this seems not to be a problem
>> as the project is developed exclusively on Windows.
> 
> Sounds good.
> 
>> However, I wonder if there are any "hidden consequences" of this setup?
>> If there are consequences, then I see two options. Either I rebase the repo
>> and fix the line endings for all commits or I add a single commit that fixes
>> the line endings for all files. Both actions require coordination with the
>> users to avoid repo trouble/merge conflicts. The "single fixup commit" options
>> would also make diffs into the past look bad. Would a single large commit have
>> any impact on the performance of standard Git operations?
> 
> There are no hidden consequences that I'm aware of.  If you later
> decide that you want to become a cross-platform project, then you may
> want to switch to LF endings, in which case I suggest the "single
> fixup commit" strategy.
> 
> In any event, you also probably want to declare what you're doing
> using .gitattributes.  By checking in the files as CRLF, you are
> declaring that you do *not* want Git to treat them as text files
> (i.e., you do not want Git to change the line endings), so something
> as simple as
> 
> 	* -text

That's sounds good. Does "-text" have any other implications? For whatever reason I always thought this is the way to tell Git that a particular file is binary with the implication that Git should not attempt to diff it.

Thanks, Lars

Previous: Stefan BellerNext: Jonathan Nieder
Message 30 of 44 in “Consequences of CRLF in index?”
  1. Lars SchneiderOct 24, 2017
  2. Jonathan NiederOct 24, 2017
  3. Torsten BögershausenOct 24, 2017
  4. Johannes SchindelinOct 25, 2017
  5. Junio C HamanoOct 25, 2017
  6. Junio C HamanoOct 25, 2017
  7. Stefan BellerOct 25, 2017
  8. Junio C HamanoOct 26, 2017
  9. Re* Consequences of CRLF in index?Junio C Hamano, Oct 27, 2017
  10. Stefan BellerOct 27, 2017
  11. 0/2 Re* Consequences of CRLF in index?Stefan Beller, Oct 27, 2017
  12. 1/2 xdiff/xdiff.h: remove unused flagsStefan Beller, Oct 27, 2017
  13. 2/2 xdiff/xdiffi.c: remove unneeded function declarationsStefan Beller, Oct 27, 2017
  14. Stefan BellerOct 30, 2017
  15. Junio C HamanoOct 31, 2017
  16. Stefan BellerOct 31, 2017
  17. Jeff KingOct 31, 2017
  18. 0/2 Teach "diff" to ignore only CR at EOLJunio C Hamano, Nov 7, 2017
  19. 2/2 diff: --ignore-cr-at-eolJunio C Hamano, Nov 7, 2017
  20. Johannes SchindelinNov 7, 2017
  21. Junio C HamanoNov 8, 2017
  22. Junio C HamanoNov 8, 2017
  23. Junio C HamanoNov 15, 2017
  24. 1/2 xdiff: reassign xpparm_t.flags bitsJunio C Hamano, Nov 7, 2017
  25. Johannes SchindelinNov 7, 2017
  26. Junio C HamanoNov 7, 2017
  27. Johannes SchindelinNov 7, 2017
  28. Junio C HamanoNov 7, 2017
  29. Stefan BellerNov 7, 2017
  30. Lars SchneiderOct 25, 2017
  31. Jonathan NiederOct 25, 2017
  32. Lars SchneiderOct 26, 2017
  33. Torsten BögershausenOct 26, 2017
  34. Johannes SixtOct 24, 2017
  35. Johannes SchindelinOct 25, 2017
  36. Johannes SixtOct 26, 2017
  37. Lars SchneiderOct 26, 2017
  38. Torsten BögershausenOct 26, 2017
  39. Johannes SixtOct 26, 2017
  40. Jonathan NiederOct 26, 2017
  41. Johannes SixtOct 26, 2017
  42. Ross KabusOct 26, 2017
  43. Junio C HamanoOct 27, 2017
  44. Johannes SchindelinOct 27, 2017

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.