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

Re: git diff-tree ignores --textconv

From
Jeff King <peff@peff.net>
Date
Sep 24, 2018, 00:43 UTC
Message-ID
<20180924004307.GA26103@sigill.intra.peff.net>
In-Reply-To
<41cd358c-d900-2996-b78a-b9d897a2ba2b@stason.org>
On Sun, Sep 23, 2018 at 03:41:45PM -0700, Stas Bekman wrote:
> $ git config --get diff.jupyternotebook.command
> git-nbdiffdriver diff
That's an "external diff driver", not a textconv driver.
So here:
> $ GIT_TRACE=1 git diff-tree -p HEAD --textconv test/test.ipynb
> <shows normal diff, ignoring nbdiff>
You probably want "--ext-diff", not "--textconv".

There's some discussion in the gitattributes manpage, but the short of it is that textconv converts binary input to text, which is then fed through the normal diff mechanism. Whereas an external diff driver is given both sides and can produce whatever output it wants. Textconv is less flexible, but generally way easier to write.

-Peff
Previous: Stas BekmanNext: Stas Bekman
Message 2 of 5 in “git diff-tree ignores --textconv”
  1. Stas BekmanSep 23, 2018
  2. Jeff KingSep 24, 2018
  3. Stas BekmanSep 24, 2018
  4. Jeff KingSep 24, 2018
  5. Stas BekmanSep 24, 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.