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

Re: [PATCH/RFC] autocrlf: Make it work also for un-normalized repositories

From
Dmitry Potapov <dpotapov@gmail.com>
Date
May 10, 2010, 21:17 UTC
Message-ID
<20100510211739.GI14069@dpotapov.dyndns.org>
In-Reply-To
<m37hnbec16.fsf@localhost.localdomain>
On Mon, May 10, 2010 at 01:30:22PM -0700, Jakub Narebski wrote:
Show 13 quoted lines
> Finn Arne Gangstad <finnag@pvv.org> writes:
> > 
> > The following sequence should now always be a NOP even with autocrlf
> > set (assuming a clean working directory):
> > 
> > git checkout <something>
> > touch *
> > git add -A .    (will add nothing)
> > git comit       (nothing to commit)
> > 
> > Previously this would break for any text file containing a CR
> 
> How this feature relates to `core.safecrfl'?

safecrlf is about making sure that you will get back exactly same file on the next checkout as you have now in your working directory unless you change your autocrlf value. So, the statement about breaking any file with CR is certainly not correct.

This feature is about preserving CRLF in files inside of the repository that were committed with CRLF despite that your current settings that suggests that those files should be committed with LF. This makes sense for the "guess" case, but it is clearly wrong when the user explicitly mandated CRLF conversion for that file through attributes.

Dmitry
Previous: Jakub NarebskiNext: Finn Arne Gangstad
Message 9 of 10 in “autocrlf: Make it work also for un-normalized repositories”
  1. autocrlf: Make it work also for un-normalized repositoriesFinn Arne Gangstad, May 10, 2010
  2. Johannes SchindelinMay 10, 2010
  3. Junio C HamanoMay 10, 2010
  4. Finn Arne GangstadMay 11, 2010
  5. Eyvind BernhardsenMay 10, 2010
  6. Dmitry PotapovMay 10, 2010
  7. Eyvind BernhardsenMay 11, 2010
  8. Jakub NarebskiMay 10, 2010
  9. Dmitry PotapovMay 10, 2010
  10. Finn Arne GangstadMay 11, 2010

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.