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

Re: [RFC PATCH] diff: add option to report binary files in raw diffs

From
Torsten Bögershausen <tboegi@web.de>
Date
Nov 7, 2025, 08:30 UTC
Message-ID
<20251107083015.GA18670@tb-raspi4>
In-Reply-To
<z5mkdl67vx47na5critwtyz7cacvhs6iixy46ia3svdoq7xui5@ckpfnjw3dkoq>
On Thu, Nov 06, 2025 at 03:42:49PM -0600, Justin Tobler wrote:
> On 25/11/05 12:04AM, Junio C Hamano wrote:
> > Justin Tobler <jltobler@gmail.com> writes:
> > 
[snip]
Show 5 quoted lines
> Currently the output in the next version will look like:
> 
>   :100644 100644 a1961526 e231acb1 binary=yy M	foo
>   :100644 100644 31eedd5c 402a70d7 binary=nn M	bar
>

I think that is a good solutution ;-) When I once developped the git ls-files --eol option someone (Junio ?) convinced my to use a TAB as a seperator. In this case just before the filename:

git ls-file --eol | xxd 
00000000: 692f 6c66 2020 2020 772f 6c66 2020 2020  i/lf    w/lf    
00000010: 6174 7472 2f20 2020 2020 2020 2020 2020  attr/           
00000020: 2020 2020 2020 092e 6369 7272 7573 2e79        ..cirrus.y
                         ^^
00000030: 6d6c 0a                                   ml.

This makes the output both human readable and machine parsable: All info is before the TAB here. (And may be parsed again in a second round, if needed). Thoughts ?

Previous: Justin ToblerNext: Junio C Hamano
Message 7 of 12 in “diff: add option to report binary files in raw diffs”
  1. diff: add option to report binary files in raw diffsJustin Tobler, Nov 4, 2025
  2. Junio C HamanoNov 4, 2025
  3. Junio C HamanoNov 4, 2025
  4. Justin ToblerNov 5, 2025
  5. Junio C HamanoNov 5, 2025
  6. Justin ToblerNov 6, 2025
  7. Torsten BögershausenNov 7, 2025
  8. Junio C HamanoNov 7, 2025
  9. Justin ToblerNov 7, 2025
  10. Junio C HamanoNov 7, 2025
  11. Ben KnobleNov 5, 2025
  12. Justin ToblerNov 6, 2025

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.