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

Re: [PATCH v1 1/2] log -G: Ignore binary files

From
Thomas Braun <thomas.braun@virtuell-zuhause.de>
Date
Nov 28, 2018, 11:31 UTC
Message-ID
<992623969.1654.1543404690644@ox.hosteurope.de>
In-Reply-To
<xmqq4lc3uyuh.fsf@gitster-ct.c.googlers.com>
Show 19 quoted lines
> Junio C Hamano <gitster@pobox.com> hat am 27. November 2018 um 01:51 geschrieben:
> 
> 
> Stefan Beller <sbeller@google.com> writes:
> 
> > On Wed, Nov 21, 2018 at 1:08 PM Thomas Braun
> > <thomas.braun@virtuell-zuhause.de> wrote:
> >>
> >> The -G <regex> option of log looks for the differences whose patch text
> >> contains added/removed lines that match regex.
> >>
> >> The concept of differences only makes sense for text files, therefore
> >> we need to ignore binary files when searching with -G <regex> as well.
> >
> > What about partial text/partial binary files?
> 
> Good point. You'd use "-a" (or "--text") to tell the diff machinery
> to treat the contents as text, and the new logic must pay attention
> to that command line option.

Yes exactly. Either use -a for the occasional use or a textconv filter for permanent use.

Coming from the opposite side: I usually mark svg files as binary as the textual diff is well, let's say uninspiring.

Previous: Junio C Hamano
Message 30 of 30 in “Teach log -G to ignore binary files”
  1. 0/2 Teach log -G to ignore binary filesThomas Braun, Nov 21, 2018
  2. 1/2 log -G: Ignore binary filesThomas Braun, Nov 21, 2018
  3. 2/2 log -S: Add test which searches in binary filesThomas Braun, Nov 21, 2018
  4. 0/2 Teach log -G to ignore binary filesThomas Braun, Nov 21, 2018
  5. log -G: Ignore binary filesThomas Braun, Nov 28, 2018
  6. Ævar Arnfjörð BjarmasonNov 28, 2018
  7. Thomas BraunDec 14, 2018
  8. Junio C HamanoNov 29, 2018
  9. Junio C HamanoNov 29, 2018
  10. Thomas BraunDec 14, 2018
  11. Thomas BraunDec 14, 2018
  12. log -G: ignore binary filesThomas Braun, Dec 14, 2018
  13. Junio C HamanoDec 26, 2018
  14. Junio C HamanoNov 22, 2018
  15. Thomas BraunNov 28, 2018
  16. Ævar Arnfjörð BjarmasonNov 22, 2018
  17. Junio C HamanoNov 24, 2018
  18. Thomas BraunNov 28, 2018
  19. Junio C HamanoNov 22, 2018
  20. Thomas BraunNov 28, 2018
  21. Ævar Arnfjörð BjarmasonNov 22, 2018
  22. Jeff KingNov 22, 2018
  23. Thomas BraunNov 28, 2018
  24. Thomas BraunNov 28, 2018
  25. Jeff KingNov 22, 2018
  26. Junio C HamanoNov 24, 2018
  27. Thomas BraunNov 28, 2018
  28. Stefan BellerNov 26, 2018
  29. Junio C HamanoNov 27, 2018
  30. Thomas BraunNov 28, 2018

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.