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

Re: [PATCH] docs: explain diff.*.binary option

From
Junio C Hamano <gitster@pobox.com>
Date
Jan 10, 2011, 17:59 UTC
Message-ID
<7vpqs463o4.fsf@alter.siamese.dyndns.org>
In-Reply-To
<20110109201003.GA4406@sigill.intra.peff.net>
Jeff King <peff@peff.net> writes:
Show 7 quoted lines
> This was added long ago as part of the userdiff refactoring
> for textconv, as internally it made the code simpler and
> cleaner. However, there was never a concrete use case for
> actually using the config variable.
>
> Now that Matthieu Moy has provided such a use case, it's
> easy to explain it using his example.

Thanks. I take it that this documents 122aa6f (diff: introduce diff.<driver>.binary, 2008-10-05) where you said...

    This patch introduces a "binary" config option for a diff
    driver, so that one can explicitly set diff.foo.binary. We
    default this value to "don't know". That is, setting a diff
    attribute to "foo" and using "diff.foo.funcname" will have
    no effect on the binaryness of a file. To get the current
    behavior, one can set diff.foo.binary to true.

I am scratching my head about the last sentence, though. Shouldn't that be "false"? In the olden days, setting diff.foo.funcname made it text but with this change it no longer is the case and instead binaryness is determined by content inspection, so forcing "text" needs to be done by saying "this is _not_ binary", no?

Previous: Matthieu MoyNext: Jeff King
Message 6 of 7 in “PostScript files: textconv and "git add -p"”
  1. Matthieu MoyJan 4, 2011
  2. Jeff KingJan 5, 2011
  3. Matthieu MoyJan 9, 2011
  4. docs: explain diff.*.binary optionJeff King, Jan 9, 2011
  5. Matthieu MoyJan 9, 2011
  6. Junio C HamanoJan 10, 2011
  7. Jeff KingJan 11, 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.