Skip to content

Commit 2a2dbd2

Browse files
committed
Merge branch 'rr/doc-content-type'
* rr/doc-content-type: Documentation: Allow custom diff tools to be specified in 'diff.tool' Documentation: Add diff.<driver>.* to config Documentation: Move diff.<driver>.* from config.txt to diff-config.txt Documentation: Add filter.<driver>.* to config
2 parents 89cd237 + 48672b3 commit 2a2dbd2

File tree

2 files changed

+103
-62
lines changed

2 files changed

+103
-62
lines changed

Documentation/config.txt

Lines changed: 11 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -810,68 +810,7 @@ commit.template::
810810
"{tilde}/" is expanded to the value of `$HOME` and "{tilde}user/" to the
811811
specified user's home directory.
812812

813-
diff.autorefreshindex::
814-
When using 'git diff' to compare with work tree
815-
files, do not consider stat-only change as changed.
816-
Instead, silently run `git update-index --refresh` to
817-
update the cached stat information for paths whose
818-
contents in the work tree match the contents in the
819-
index. This option defaults to true. Note that this
820-
affects only 'git diff' Porcelain, and not lower level
821-
'diff' commands such as 'git diff-files'.
822-
823-
diff.external::
824-
If this config variable is set, diff generation is not
825-
performed using the internal diff machinery, but using the
826-
given command. Can be overridden with the `GIT_EXTERNAL_DIFF'
827-
environment variable. The command is called with parameters
828-
as described under "git Diffs" in linkgit:git[1]. Note: if
829-
you want to use an external diff program only on a subset of
830-
your files, you might want to use linkgit:gitattributes[5] instead.
831-
832-
diff.mnemonicprefix::
833-
If set, 'git diff' uses a prefix pair that is different from the
834-
standard "a/" and "b/" depending on what is being compared. When
835-
this configuration is in effect, reverse diff output also swaps
836-
the order of the prefixes:
837-
`git diff`;;
838-
compares the (i)ndex and the (w)ork tree;
839-
`git diff HEAD`;;
840-
compares a (c)ommit and the (w)ork tree;
841-
`git diff --cached`;;
842-
compares a (c)ommit and the (i)ndex;
843-
`git diff HEAD:file1 file2`;;
844-
compares an (o)bject and a (w)ork tree entity;
845-
`git diff --no-index a b`;;
846-
compares two non-git things (1) and (2).
847-
848-
diff.noprefix::
849-
If set, 'git diff' does not show any source or destination prefix.
850-
851-
diff.renameLimit::
852-
The number of files to consider when performing the copy/rename
853-
detection; equivalent to the 'git diff' option '-l'.
854-
855-
diff.renames::
856-
Tells git to detect renames. If set to any boolean value, it
857-
will enable basic rename detection. If set to "copies" or
858-
"copy", it will detect copies, as well.
859-
860-
diff.ignoreSubmodules::
861-
Sets the default value of --ignore-submodules. Note that this
862-
affects only 'git diff' Porcelain, and not lower level 'diff'
863-
commands such as 'git diff-files'. 'git checkout' also honors
864-
this setting when reporting uncommitted changes.
865-
866-
diff.suppressBlankEmpty::
867-
A boolean to inhibit the standard behavior of printing a space
868-
before each empty output line. Defaults to false.
869-
870-
diff.tool::
871-
Controls which diff tool is used. `diff.tool` overrides
872-
`merge.tool` when used by linkgit:git-difftool[1] and has
873-
the same valid values as `merge.tool` minus "tortoisemerge"
874-
and plus "kompare".
813+
include::diff-config.txt[]
875814

876815
difftool.<tool>.path::
877816
Override the path for the given tool. This is useful in case
@@ -975,6 +914,16 @@ format.signoff::
975914
the rights to submit this work under the same open source license.
976915
Please see the 'SubmittingPatches' document for further discussion.
977916

917+
filter.<driver>.clean::
918+
The command which is used to convert the content of a worktree
919+
file to a blob upon checkin. See linkgit:gitattributes[5] for
920+
details.
921+
922+
filter.<driver>.smudge::
923+
The command which is used to convert the content of a blob
924+
object to a worktree file upon checkout. See
925+
linkgit:gitattributes[5] for details.
926+
978927
gc.aggressiveWindow::
979928
The window size parameter used in the delta compression
980929
algorithm used by 'git gc --aggressive'. This defaults

Documentation/diff-config.txt

Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
diff.autorefreshindex::
2+
When using 'git diff' to compare with work tree
3+
files, do not consider stat-only change as changed.
4+
Instead, silently run `git update-index --refresh` to
5+
update the cached stat information for paths whose
6+
contents in the work tree match the contents in the
7+
index. This option defaults to true. Note that this
8+
affects only 'git diff' Porcelain, and not lower level
9+
'diff' commands such as 'git diff-files'.
10+
11+
diff.external::
12+
If this config variable is set, diff generation is not
13+
performed using the internal diff machinery, but using the
14+
given command. Can be overridden with the `GIT_EXTERNAL_DIFF'
15+
environment variable. The command is called with parameters
16+
as described under "git Diffs" in linkgit:git[1]. Note: if
17+
you want to use an external diff program only on a subset of
18+
your files, you might want to use linkgit:gitattributes[5] instead.
19+
20+
diff.ignoreSubmodules::
21+
Sets the default value of --ignore-submodules. Note that this
22+
affects only 'git diff' Porcelain, and not lower level 'diff'
23+
commands such as 'git diff-files'. 'git checkout' also honors
24+
this setting when reporting uncommitted changes.
25+
26+
diff.mnemonicprefix::
27+
If set, 'git diff' uses a prefix pair that is different from the
28+
standard "a/" and "b/" depending on what is being compared. When
29+
this configuration is in effect, reverse diff output also swaps
30+
the order of the prefixes:
31+
`git diff`;;
32+
compares the (i)ndex and the (w)ork tree;
33+
`git diff HEAD`;;
34+
compares a (c)ommit and the (w)ork tree;
35+
`git diff --cached`;;
36+
compares a (c)ommit and the (i)ndex;
37+
`git diff HEAD:file1 file2`;;
38+
compares an (o)bject and a (w)ork tree entity;
39+
`git diff --no-index a b`;;
40+
compares two non-git things (1) and (2).
41+
42+
diff.noprefix::
43+
If set, 'git diff' does not show any source or destination prefix.
44+
45+
diff.renameLimit::
46+
The number of files to consider when performing the copy/rename
47+
detection; equivalent to the 'git diff' option '-l'.
48+
49+
diff.renames::
50+
Tells git to detect renames. If set to any boolean value, it
51+
will enable basic rename detection. If set to "copies" or
52+
"copy", it will detect copies, as well.
53+
54+
diff.suppressBlankEmpty::
55+
A boolean to inhibit the standard behavior of printing a space
56+
before each empty output line. Defaults to false.
57+
58+
diff.<driver>.command::
59+
The custom diff driver command. See linkgit:gitattributes[5]
60+
for details.
61+
62+
diff.<driver>.xfuncname::
63+
The regular expression that the diff driver should use to
64+
recognize the hunk header. A built-in pattern may also be used.
65+
See linkgit:gitattributes[5] for details.
66+
67+
diff.<driver>.binary::
68+
Set this option to true to make the diff driver treat files as
69+
binary. See linkgit:gitattributes[5] for details.
70+
71+
diff.<driver>.textconv::
72+
The command that the diff driver should call to generate the
73+
text-converted version of a file. The result of the
74+
conversion is used to generate a human-readable diff. See
75+
linkgit:gitattributes[5] for details.
76+
77+
diff.<driver>.wordregex::
78+
The regular expression that the diff driver should use to
79+
split words in a line. See linkgit:gitattributes[5] for
80+
details.
81+
82+
diff.<driver>.cachetextconv::
83+
Set this option to true to make the diff driver cache the text
84+
conversion outputs. See linkgit:gitattributes[5] for details.
85+
86+
diff.tool::
87+
The diff tool to be used by linkgit:git-difftool[1]. This
88+
option overrides `merge.tool`, and has the same valid built-in
89+
values as `merge.tool` minus "tortoisemerge" and plus
90+
"kompare". Any other value is treated as a custom diff tool,
91+
and there must be a corresponding `difftool.<tool>.cmd`
92+
option.

0 commit comments

Comments
 (0)