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

Re: [PATCH] diff: treat -crlf files as binary

From
Avery Pennarun <apenwarr@gmail.com>
Date
Aug 29, 2008, 21:56 UTC
Message-ID
<32541b130808291456k3de953a2yd1e93bc27ad14293@mail.gmail.com>
In-Reply-To
<7vfxon4ikr.fsf@gitster.siamese.dyndns.org>
On Fri, Aug 29, 2008 at 5:28 PM, Junio C Hamano <gitster@pobox.com> wrote:
Show 11 quoted lines
> The manual advertises that setting "crlf" attribute to false marks the
> file as binary.  We should pay attention to this condition in addition
> to the "do not diff" attribute (i.e. setting "diff" to false) when
> deciding not to show the textual diff.
>
> Signed-off-by: Junio C Hamano <gitster@pobox.com>
> ---
>
>  * Strictly speaking any change is backward incompatible, and this is
>   certainly one, but I do not think of a good use case to depend on the
>   previous behaviour, which was reported as a bug by my coworker.

I'm not sure this is a good idea. In our repository, for example, we have a few files that are strictly speaking "text" but absolutely, positively must be CRLF on all platforms because the idiotic proprietary parsers and generators that manipulate them need it to be that way.

I think the bug is that "crlf=false" should not be considered the same as "binary=true", which seems to be a bug in the documentation, not the program.

Have fun,
Avery
Previous: Junio C HamanoNext: Junio C Hamano
Message 2 of 8 in “diff: treat -crlf files as binary”
  1. diff: treat -crlf files as binaryJunio C Hamano, Aug 29, 2008
  2. Avery PennarunAug 29, 2008
  3. Junio C HamanoAug 30, 2008
  4. Avery PennarunAug 31, 2008
  5. Matthieu MoyAug 31, 2008
  6. Alex RiesenAug 31, 2008
  7. Junio C HamanoAug 31, 2008
  8. Avery PennarunAug 31, 2008

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.