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

Re: [PATCH 0/2] submodule add + autocrlf + safecrlf

From
Junio C Hamano <gitster@pobox.com>
Date
Jun 20, 2012, 17:49 UTC
Message-ID
<7vipelx49g.fsf@alter.siamese.dyndns.org>
In-Reply-To
<cover.1340202515.git.brad.king@kitware.com>
Brad King <brad.king@kitware.com> writes:
Show 10 quoted lines
> When 'git submodule add' uses 'git config' to create a
> '.gitmodules' file it gets LF newlines that the subsequent
> 'git add --force .gitmodules' rejects if autocrlf and
> safecrlf are both enabled.  This series adds a test and
> proposes a fix that simply uses '-c core.safecrlf=false'
> to disable safecrlf when adding '.gitmodules'.
>
> I'm not excited by allowing a LF file in work tree that
> has clearly been configured to prefer CRLF, but avoiding
> that for .gitmodules is probably a separate issue.

I have a suspicion that "git config" should be taught about this kind of thing instead.

Shoudn't your .git/config file that is outside the revision control also end with CRLF if your platform and project prefer CRLF over LF?

Previous: Jens LehmannNext: Brad King
Message 10 of 12 in “submodule add + autocrlf + safecrlf”
  1. 0/2 submodule add + autocrlf + safecrlfBrad King, Jun 20, 2012
  2. 1/2 submodule: Demonstrate failure to add with auto/safecrlfBrad King, Jun 20, 2012
  3. 2/2 submodule: Tolerate auto/safecrlf when adding .gitmodulesBrad King, Jun 20, 2012
  4. Jens LehmannJun 20, 2012
  5. Brad KingJun 20, 2012
  6. Jens LehmannJun 20, 2012
  7. Jeff KingJun 20, 2012
  8. Junio C HamanoJun 20, 2012
  9. Jens LehmannJun 21, 2012
  10. Junio C HamanoJun 20, 2012
  11. Brad KingJun 20, 2012
  12. Junio C HamanoJun 20, 2012

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.