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

git diff-tree ignores --textconv

From
SBStas Bekman <stas@stason.org>
Date
Sep 23, 2018, 22:41 UTC
Message-ID
<41cd358c-d900-2996-b78a-b9d897a2ba2b@stason.org>
Hi,

I'm using a 3rd party application that internally uses 'git diff-tree' instead of 'git diff'. I'm trying to add filter and it works with 'git diff' but it gets ignored with 'git diff-tree' despite having --textconv.

I was able to reproduce the problem with the following much more simplified setup:

$ git check-attr diff test/test.ipynb test/test.ipynb: diff: jupyternotebook

$ git config --get diff.jupyternotebook.command git-nbdiffdriver diff

$ GIT_TRACE=1 git diff test/test.ipynb [...] run_command: GIT_DIFF_PATH_COUNTER=1 GIT_DIFF_PATH_TOTAL=1 'git-nbdiffdriver diff' [...] <shows nbdiff output as desired>

$ GIT_TRACE=1 git diff-tree -p HEAD --textconv test/test.ipynb <shows normal diff, ignoring nbdiff>

Git tracing shows nothing relevant as in the command above.

According to https://git-scm.com/docs/git-diff-tree adding --textconv should have respected the configured diff filter, but it does nothing.

Is this a bug or do I have something misconfigured?
Thank you.
git version 2.17.1
-- 
________________________________________________
Stas Bekman       <'))))><       <'))))><
https://stasosphere.com  https://chestofbooks.com
https://experientialsexlab.com https://stason.org
https://stasosphere.com/experience-life/my-books
Next: Jeff King
Message 1 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.