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

Re: [PATCH v2] Documentation: Document diff.<tool>.* and filter.<driver>.* in config

From
Michael J Gruber <git@drmicha.warpmail.net>
Date
Apr 1, 2011, 13:56 UTC
Message-ID
<4D95D990.1050306@drmicha.warpmail.net>
In-Reply-To
<1301654600-8901-1-git-send-email-artagnon@gmail.com>
Ramkumar Ramachandra venit, vidit, dixit 01.04.2011 12:43:
Show 59 quoted lines
> Although the gitattributes page contains comprehensive information
> about these configuration options, they should be included in the
> config documentation for completeness.
> 
> Helped-by: Jakub Narebski <jnareb@gmail.com>
> Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com>
> ---
> The first iteration of this patch contained completely wrong
> descriptions for diff.<tool>.* options. Thanks to Jakub for pointing
> them out, and for pointing out that I left out a a few options
> undocumented (found in userdiff.c).
> 
>  Documentation/config.txt |   46 ++++++++++++++++++++++++++++++++++++++++++++++
>  1 files changed, 46 insertions(+), 0 deletions(-)
> 
> diff --git a/Documentation/config.txt b/Documentation/config.txt
> index 8ea55d4..b2ec4e1 100644
> --- a/Documentation/config.txt
> +++ b/Documentation/config.txt
> @@ -875,6 +875,42 @@ diff.tool::
>  	the same valid values as `merge.tool` minus "tortoisemerge"
>  	and plus "kompare".
>  
> +diff.<tool>.command::
> +	Defines command to be called to generate diff for files with
> +	`diff=<tool>` gitattribute.  See linkgit:gitattributes[5] for
> +	details.
> +
> +diff.<tool>.funcname::
> +	Specifies a regular expression that matches a line to use as
> +	the hunk header for files with `diff=<tool>` gitattribute. A
> +	built-in pattern may also be used.  See
> +	linkgit:gitattributes[5] for details.
> +
> +diff.<tool>.xfuncname::
> +	Same as 'diff.<tool>.funcname', except that an extended
> +	regular expression can be specified in this case.
> +
> +diff.<tool>.binary::
> +	Set to true to treat files files with `diff=<tool>`
> +	gitattribute as binary for the purposes of diff.  See
> +	linkgit:gitattributes[5] for details.
> +
> +diff.<tool>.textconv::
> +	Defines command to be called to generate text-converted version
> +	of a binary file with `diff=<tool>` gitattribute.  The result of
> +	the conversion is used to generate human-readable diff.  See
> +	linkgit:gitattributes[5] for details.
> +
> +diff.<tool>.wordregex::
> +	Specifies the regular expression to use to customize the rules
> +	that `git diff --word-diff` uses to split words in a line.
> +	See linkgit:gitattributes[5] for details.
> +
> +diff.<tool>.cachetextconv::
> +	Set to true to enable caching of text conversion outputs for
> +	files with `diff=<tool>` gitattribute.  See
> +	linkgit:gitattributes[5] for details.
> +

I am sorry, but I dislike this for several reasons. First, the wording: "to use to customize" and the like are no fun to read, and there are several articles missing.

More importantly: Those config options are not about difftools! Having diff.<tool>.* before difftool.* is grossly misleading. The options above are all about external diff drivers. So, diff.<driver>.* would be appropriate here, esp. when looking at merge.*

Show 20 quoted lines
>  difftool.<tool>.path::
>  	Override the path for the given tool.  This is useful in case
>  	your tool is not in the PATH.
> @@ -973,6 +1009,16 @@ format.signoff::
>      the rights to submit this work under the same open source license.
>      Please see the 'SubmittingPatches' document for further discussion.
>  
> +filter.<driver>.clean::
> +	Defines the command to be used to convert the contents of
> +	worktree file upon checkin.  See linkgit:gitattributes[5] for
> +	details.
> +
> +filter.<driver>.smudge::
> +	Defines the command to be used to convert the blob object to
> +	worktree file upon checkout.  See linkgit:gitattributes[5] for
> +	details.
> +
>  gc.aggressiveWindow::
>  	The window size parameter used in the delta compression
>  	algorithm used by 'git gc --aggressive'.  This defaults
Previous: Jakub NarebskiNext: Ramkumar Ramachandra
Message 5 of 33 in “Documentation: Document diff.<tool>.* and filter.<driver>.* in config”
  1. Documentation: Document diff.<tool>.* and filter.<driver>.* in configRamkumar Ramachandra, Apr 1, 2011
  2. Jakub NarebskiApr 1, 2011
  3. Documentation: Document diff.<tool>.* and filter.<driver>.* in configRamkumar Ramachandra, Apr 1, 2011
  4. Jakub NarebskiApr 1, 2011
  5. Michael J GruberApr 1, 2011
  6. 0/3 Document diff and filter drivers in configRamkumar Ramachandra, Apr 3, 2011
  7. 1/3 Documentation: Add filter.<driver>.* to configRamkumar Ramachandra, Apr 3, 2011
  8. Michael J GruberApr 4, 2011
  9. 2/3 Documentation: Add diff.<driver>.* to configRamkumar Ramachandra, Apr 3, 2011
  10. Michael J GruberApr 4, 2011
  11. Junio C HamanoApr 4, 2011
  12. 3/3 Documentation: Allow custom diff tools to be specified in 'diff.tool'Ramkumar Ramachandra, Apr 3, 2011
  13. Michael J GruberApr 4, 2011
  14. 0/4 Document diff and filter drivers in configRamkumar Ramachandra, Apr 6, 2011
  15. 1/4 Documentation: Add filter.<driver>.* to configRamkumar Ramachandra, Apr 6, 2011
  16. Michael J GruberApr 6, 2011
  17. Ramkumar RamachandraApr 6, 2011
  18. Junio C HamanoApr 6, 2011
  19. Ramkumar RamachandraApr 6, 2011
  20. Michael J GruberApr 7, 2011
  21. Ramkumar RamachandraApr 7, 2011
  22. 2/4 Documentation: Add diff.<driver>.* to configRamkumar Ramachandra, Apr 6, 2011
  23. 3/4 Documentation: Allow custom diff tools to be specified in 'diff.tool'Ramkumar Ramachandra, Apr 6, 2011
  24. 4/4 Documentation: Minor language improvements to merge-configRamkumar Ramachandra, Apr 6, 2011
  25. 0/4 Document diff and filter drivers in configRamkumar Ramachandra, Apr 6, 2011
  26. 1/4 Documentation: Add filter.<driver>.* to configRamkumar Ramachandra, Apr 6, 2011
  27. 2/4 Documentation: Add diff.<driver>.* to configRamkumar Ramachandra, Apr 6, 2011
  28. Junio C HamanoApr 6, 2011
  29. Ramkumar RamachandraApr 7, 2011
  30. 3/4 Documentation: Allow custom diff tools to be specified in 'diff.tool'Ramkumar Ramachandra, Apr 6, 2011
  31. 4/4 Documentation: Minor language improvements to merge-configRamkumar Ramachandra, Apr 6, 2011
  32. Michael J GruberApr 7, 2011
  33. Michael J GruberApr 7, 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.