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

Re: Surprising interaction of "binary" and "eol" gitattributes

From
Torsten Bögershausen <tboegi@web.de>
Date
Mar 5, 2015, 20:49 UTC
Message-ID
<54F8C152.7010203@web.de>
In-Reply-To
<54F88684.3020905@alum.mit.edu>
On 2015-03-05 17.38, Michael Haggerty wrote:
Show 26 quoted lines
> I would expect that the following .gitattributes file
> 
>     *       eol=crlf
>     *.png   -text
> 
> would leave EOL translation turned off for PNG files. In other words, I
> would expect that explicitly setting "-text" would take precedence over
> the fact that setting "eol" implies that a file should be considered to
> be "text".
> 
> I would even more strongly expect
> 
>     *       eol=crlf
>     *.png   binary
> 
> to turn off EOL translation for PNG files.
> 
> But in fact, in both of the above cases, EOL translation is turned *on*
> for PNG files.
> 
> I propose that "-text" should override any setting for "eol" (which
> would of course fix both problems, since "binary" is equivalent to
> "-diff -merge -text"). What do people think?
> 
> Michael
> 

("binary" is not supported, we need "-text") Beside that,

>     *       eol=crlf
>     *.png   -text
should work as you describe.

Do you think you make a test case for this ? In best case as a real patch :-)

(I know that attributes should take precedence over eol settings in the config file, and this is not always the case)

Previous: Michael HaggertyNext: Junio C Hamano
Message 2 of 17 in “Surprising interaction of "binary" and "eol" gitattributes”
  1. Michael HaggertyMar 5, 2015
  2. Torsten BögershausenMar 5, 2015
  3. Junio C HamanoMar 5, 2015
  4. Torsten BögershausenMar 6, 2015
  5. Michael HaggertyMar 6, 2015
  6. Torsten BögershausenMar 6, 2015
  7. Michael HaggertyMar 10, 2015
  8. Junio C HamanoMar 10, 2015
  9. Michael HaggertyMar 10, 2015
  10. Junio C HamanoMar 10, 2015
  11. Torsten BögershausenMar 11, 2015
  12. Junio C HamanoMar 11, 2015
  13. Johannes SixtMar 11, 2015
  14. Junio C HamanoMar 11, 2015
  15. Junio C HamanoMar 11, 2015
  16. Torsten BögershausenMar 10, 2015
  17. Michael HaggertyMar 10, 2015

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.