Skip to content

Commit 7a54d74

Browse files
committed
Merge branch 'ab/dedup-config-and-command-docs'
Share the text used to explain configuration variables used by "git <subcmd>" in "git help <subcmd>" with the text from "git help config". * ab/dedup-config-and-command-docs: docs: add CONFIGURATION sections that fuzzy map to built-ins docs: add CONFIGURATION sections that map to a built-in log docs: de-duplicate configuration sections difftool docs: de-duplicate configuration sections notes docs: de-duplicate and combine configuration sections apply docs: de-duplicate configuration sections send-email docs: de-duplicate configuration sections grep docs: de-duplicate configuration sections docs: add and use include template for config/* includes
2 parents dd407f1 + 9274dea commit 7a54d74

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+280
-226
lines changed

Documentation/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ HOWTO_TXT += $(wildcard howto/*.txt)
6262

6363
DOC_DEP_TXT += $(wildcard *.txt)
6464
DOC_DEP_TXT += $(wildcard config/*.txt)
65+
DOC_DEP_TXT += $(wildcard includes/*.txt)
6566

6667
ifdef MAN_FILTER
6768
MAN_TXT = $(filter $(MAN_FILTER),$(MAN1_TXT) $(MAN5_TXT) $(MAN7_TXT))

Documentation/config/diff.txt

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -178,21 +178,6 @@ diff.<driver>.cachetextconv::
178178
Set this option to true to make the diff driver cache the text
179179
conversion outputs. See linkgit:gitattributes[5] for details.
180180

181-
diff.tool::
182-
Controls which diff tool is used by linkgit:git-difftool[1].
183-
This variable overrides the value configured in `merge.tool`.
184-
The list below shows the valid built-in values.
185-
Any other value is treated as a custom diff tool and requires
186-
that a corresponding difftool.<tool>.cmd variable is defined.
187-
188-
diff.guitool::
189-
Controls which diff tool is used by linkgit:git-difftool[1] when
190-
the -g/--gui flag is specified. This variable overrides the value
191-
configured in `merge.guitool`. The list below shows the valid
192-
built-in values. Any other value is treated as a custom diff tool
193-
and requires that a corresponding difftool.<guitool>.cmd variable
194-
is defined.
195-
196181
include::../mergetools-diff.txt[]
197182

198183
diff.indentHeuristic::

Documentation/config/difftool.txt

Lines changed: 25 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,17 @@
1-
difftool.<tool>.path::
2-
Override the path for the given tool. This is useful in case
3-
your tool is not in the PATH.
1+
diff.tool::
2+
Controls which diff tool is used by linkgit:git-difftool[1].
3+
This variable overrides the value configured in `merge.tool`.
4+
The list below shows the valid built-in values.
5+
Any other value is treated as a custom diff tool and requires
6+
that a corresponding difftool.<tool>.cmd variable is defined.
7+
8+
diff.guitool::
9+
Controls which diff tool is used by linkgit:git-difftool[1] when
10+
the -g/--gui flag is specified. This variable overrides the value
11+
configured in `merge.guitool`. The list below shows the valid
12+
built-in values. Any other value is treated as a custom diff tool
13+
and requires that a corresponding difftool.<guitool>.cmd variable
14+
is defined.
415

516
difftool.<tool>.cmd::
617
Specify the command to invoke the specified diff tool.
@@ -9,6 +20,17 @@ difftool.<tool>.cmd::
920
file containing the contents of the diff pre-image and 'REMOTE'
1021
is set to the name of the temporary file containing the contents
1122
of the diff post-image.
23+
+
24+
See the `--tool=<tool>` option in linkgit:git-difftool[1] for more details.
25+
26+
difftool.<tool>.path::
27+
Override the path for the given tool. This is useful in case
28+
your tool is not in the PATH.
29+
30+
difftool.trustExitCode::
31+
Exit difftool if the invoked diff tool returns a non-zero exit status.
32+
+
33+
See the `--trust-exit-code` option in linkgit:git-difftool[1] for more details.
1234

1335
difftool.prompt::
1436
Prompt before each invocation of the diff tool.

Documentation/config/grep.txt

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,11 @@ grep.extendedRegexp::
1717
other than 'default'.
1818

1919
grep.threads::
20-
Number of grep worker threads to use.
21-
See `grep.threads` in linkgit:git-grep[1] for more information.
20+
Number of grep worker threads to use. If unset (or set to 0), Git will
21+
use as many threads as the number of logical cores available.
22+
23+
grep.fullName::
24+
If set to true, enable `--full-name` option by default.
2225

2326
grep.fallbackToNoIndex::
2427
If set to true, fall back to git grep --no-index if git grep

Documentation/config/log.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ log.date::
77
Set the default date-time mode for the 'log' command.
88
Setting a value for log.date is similar to using 'git log''s
99
`--date` option. See linkgit:git-log[1] for details.
10+
+
11+
If the format is set to "auto:foo" and the pager is in use, format
12+
"foo" will be the used for the date format. Otherwise "default" will
13+
be used.
1014

1115
log.decorate::
1216
Print out the ref names of any commits that are shown by the log

Documentation/config/notes.txt

Lines changed: 26 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@ notes.mergeStrategy::
33
conflicts. Must be one of `manual`, `ours`, `theirs`, `union`, or
44
`cat_sort_uniq`. Defaults to `manual`. See "NOTES MERGE STRATEGIES"
55
section of linkgit:git-notes[1] for more information on each strategy.
6+
+
7+
This setting can be overridden by passing the `--strategy` option to
8+
linkgit:git-notes[1].
69

710
notes.<name>.mergeStrategy::
811
Which merge strategy to choose when doing a notes merge into
@@ -11,28 +14,35 @@ notes.<name>.mergeStrategy::
1114
linkgit:git-notes[1] for more information on the available strategies.
1215

1316
notes.displayRef::
14-
The (fully qualified) refname from which to show notes when
15-
showing commit messages. The value of this variable can be set
16-
to a glob, in which case notes from all matching refs will be
17-
shown. You may also specify this configuration variable
18-
several times. A warning will be issued for refs that do not
19-
exist, but a glob that does not match any refs is silently
20-
ignored.
17+
Which ref (or refs, if a glob or specified more than once), in
18+
addition to the default set by `core.notesRef` or
19+
`GIT_NOTES_REF`, to read notes from when showing commit
20+
messages with the 'git log' family of commands.
2121
+
2222
This setting can be overridden with the `GIT_NOTES_DISPLAY_REF`
2323
environment variable, which must be a colon separated list of refs or
2424
globs.
2525
+
26+
A warning will be issued for refs that do not exist,
27+
but a glob that does not match any refs is silently ignored.
28+
+
29+
This setting can be disabled by the `--no-notes` option to the 'git
30+
log' family of commands, or by the `--notes=<ref>` option accepted by
31+
those commands.
32+
+
2633
The effective value of "core.notesRef" (possibly overridden by
2734
GIT_NOTES_REF) is also implicitly added to the list of refs to be
2835
displayed.
2936

3037
notes.rewrite.<command>::
3138
When rewriting commits with <command> (currently `amend` or
32-
`rebase`) and this variable is set to `true`, Git
33-
automatically copies your notes from the original to the
34-
rewritten commit. Defaults to `true`, but see
35-
"notes.rewriteRef" below.
39+
`rebase`), if this variable is `false`, git will not copy
40+
notes from the original to the rewritten commit. Defaults to
41+
`true`. See also "`notes.rewriteRef`" below.
42+
+
43+
This setting can be overridden with the `GIT_NOTES_REWRITE_REF`
44+
environment variable, which must be a colon separated list of refs or
45+
globs.
3646

3747
notes.rewriteMode::
3848
When copying notes during a rewrite (see the
@@ -46,14 +56,13 @@ environment variable.
4656

4757
notes.rewriteRef::
4858
When copying notes during a rewrite, specifies the (fully
49-
qualified) ref whose notes should be copied. The ref may be a
50-
glob, in which case notes in all matching refs will be copied.
51-
You may also specify this configuration several times.
59+
qualified) ref whose notes should be copied. May be a glob,
60+
in which case notes in all matching refs will be copied. You
61+
may also specify this configuration several times.
5262
+
5363
Does not have a default value; you must configure this variable to
5464
enable note rewriting. Set it to `refs/notes/commits` to enable
5565
rewriting for the default commit notes.
5666
+
57-
This setting can be overridden with the `GIT_NOTES_REWRITE_REF`
58-
environment variable, which must be a colon separated list of refs or
59-
globs.
67+
Can be overridden with the `GIT_NOTES_REWRITE_REF` environment variable.
68+
See `notes.rewrite.<command>` above for a further description of its format.

Documentation/config/sendemail.txt

Lines changed: 37 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,17 +18,49 @@ sendemail.<identity>.*::
1818
identity is selected, through either the command-line or
1919
`sendemail.identity`.
2020

21+
sendemail.multiEdit::
22+
If true (default), a single editor instance will be spawned to edit
23+
files you have to edit (patches when `--annotate` is used, and the
24+
summary when `--compose` is used). If false, files will be edited one
25+
after the other, spawning a new editor each time.
26+
27+
sendemail.confirm::
28+
Sets the default for whether to confirm before sending. Must be
29+
one of 'always', 'never', 'cc', 'compose', or 'auto'. See `--confirm`
30+
in the linkgit:git-send-email[1] documentation for the meaning of these
31+
values.
32+
2133
sendemail.aliasesFile::
34+
To avoid typing long email addresses, point this to one or more
35+
email aliases files. You must also supply `sendemail.aliasFileType`.
36+
2237
sendemail.aliasFileType::
38+
Format of the file(s) specified in sendemail.aliasesFile. Must be
39+
one of 'mutt', 'mailrc', 'pine', 'elm', or 'gnus', or 'sendmail'.
40+
+
41+
What an alias file in each format looks like can be found in
42+
the documentation of the email program of the same name. The
43+
differences and limitations from the standard formats are
44+
described below:
45+
+
46+
--
47+
sendmail;;
48+
* Quoted aliases and quoted addresses are not supported: lines that
49+
contain a `"` symbol are ignored.
50+
* Redirection to a file (`/path/name`) or pipe (`|command`) is not
51+
supported.
52+
* File inclusion (`:include: /path/name`) is not supported.
53+
* Warnings are printed on the standard error output for any
54+
explicitly unsupported constructs, and any other lines that are not
55+
recognized by the parser.
56+
--
2357
sendemail.annotate::
2458
sendemail.bcc::
2559
sendemail.cc::
2660
sendemail.ccCmd::
2761
sendemail.chainReplyTo::
28-
sendemail.confirm::
2962
sendemail.envelopeSender::
3063
sendemail.from::
31-
sendemail.multiEdit::
3264
sendemail.signedoffbycc::
3365
sendemail.smtpPass::
3466
sendemail.suppresscc::
@@ -44,7 +76,9 @@ sendemail.thread::
4476
sendemail.transferEncoding::
4577
sendemail.validate::
4678
sendemail.xmailer::
47-
See linkgit:git-send-email[1] for description.
79+
These configuration variables all provide a default for
80+
linkgit:git-send-email[1] command-line options. See its
81+
documentation for details.
4882

4983
sendemail.signedoffcc (deprecated)::
5084
Deprecated alias for `sendemail.signedoffbycc`.

Documentation/git-add.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -433,6 +433,13 @@ they will make the patch impossible to apply:
433433
* deleting context or removal lines
434434
* modifying the contents of context or removal lines
435435

436+
CONFIGURATION
437+
-------------
438+
439+
include::includes/cmd-config-section-all.txt[]
440+
441+
include::config/add.txt[]
442+
436443
SEE ALSO
437444
--------
438445
linkgit:git-status[1]

Documentation/git-am.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -258,6 +258,13 @@ This command can run `applypatch-msg`, `pre-applypatch`,
258258
and `post-applypatch` hooks. See linkgit:githooks[5] for more
259259
information.
260260

261+
CONFIGURATION
262+
-------------
263+
264+
include::includes/cmd-config-section-all.txt[]
265+
266+
include::config/am.txt[]
267+
261268
SEE ALSO
262269
--------
263270
linkgit:git-apply[1].

Documentation/git-apply.txt

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -263,13 +263,9 @@ has no effect when `--index` or `--cached` is in use.
263263
CONFIGURATION
264264
-------------
265265

266-
apply.ignoreWhitespace::
267-
Set to 'change' if you want changes in whitespace to be ignored by default.
268-
Set to one of: no, none, never, false if you want changes in
269-
whitespace to be significant.
270-
apply.whitespace::
271-
When no `--whitespace` flag is given from the command
272-
line, this configuration item is used as the default.
266+
include::includes/cmd-config-section-all.txt[]
267+
268+
include::config/apply.txt[]
273269

274270
SUBMODULES
275271
----------

0 commit comments

Comments
 (0)