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

Re: Git EOL Normalization

From
SBStephen Bash <bash@genarts.com>
Date
May 26, 2011, 16:28 UTC
Message-ID
<22629514.41388.1306427328539.JavaMail.root@mail.hq.genarts.com>
In-Reply-To
<7v1uzlzbra.fsf@alter.siamese.dyndns.org>
----- Original Message -----
Show 12 quoted lines
> From: "Junio C Hamano" <gitster@pobox.com>
> To: "Jakub Narebski" <jnareb@gmail.com>
> Sent: Thursday, May 26, 2011 12:07:21 PM
> Subject: Re: Git EOL Normalization
> 
> > I think git examines only first block of a file or so. The heuristic
> > to detect binary-ness of a file is, as I have heard, the same or
> > similar to the one that GNU diff uses.
> 
> Yes, the binary detection was designed to be compatible with GNU diff. But
> I do not think it has much to do with the topic of this thread. Aren't
> other people discussing the line ending?
The binary detection may be apropos because there are situations (core.autocrlf={true,input} and text=auto) where Git will only do line ending conversion if it detects a text file...  But I'll leave it to people who know the code better to say if this binary detection is in fact part of the decision process.

Thanks, Stephen

Previous: Junio C HamanoNext: Drew Northup
Message 7 of 8 in “Git EOL Normalization”
  1. Stephen BashMay 25, 2011
  2. Dmitry PotapovMay 25, 2011
  3. Stephen BashMay 25, 2011
  4. Jakub NarebskiMay 26, 2011
  5. Dmitry PotapovMay 26, 2011
  6. Junio C HamanoMay 26, 2011
  7. Stephen BashMay 26, 2011
  8. Drew NorthupMay 31, 2011

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.