From 18d89fe25c80de269e8c6d14213ff400bc480e96 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=86var=20Arnfj=C3=B6r=C3=B0=20Bjarmason?= Date: Wed, 7 Sep 2022 10:26:57 +0200 Subject: docs: add and use include template for config/* includes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit In b6a8d09f6d8 (gc docs: include the "gc.*" section from "config" in "gc", 2019-04-07) the "git gc" documentation was made to include the config/gc.txt in its "CONFIGURATION" section. We do that in several other places, but "git gc" was the only one with a blurb above the include to orient the reader. We don't want readers to carefully scrutinize "git-config(1)" and "git-gc(1)" looking for discrepancies, instead we should tell them that the latter includes a part of the former. This change formalizes that wording in two new templates to be included, one for the "git gc" case where the entire section is included from "git-config(1)", and another for when the inclusion of "git-config(1)" follows discussion unique to that documentation. In order to use that re-arrange the order of those being discussed in the "git-merge(1)" documentation. Signed-off-by: Ævar Arnfjörð Bjarmason Reviewed-by: Matheus Tavares Signed-off-by: Junio C Hamano diff --git a/Documentation/Makefile b/Documentation/Makefile index 4f801f4..85b2088 100644 --- a/Documentation/Makefile +++ b/Documentation/Makefile @@ -51,6 +51,7 @@ HOWTO_TXT += $(wildcard howto/*.txt) DOC_DEP_TXT += $(wildcard *.txt) DOC_DEP_TXT += $(wildcard config/*.txt) +DOC_DEP_TXT += $(wildcard includes/*.txt) ifdef MAN_FILTER MAN_TXT = $(filter $(MAN_FILTER),$(MAN1_TXT) $(MAN5_TXT) $(MAN7_TXT)) diff --git a/Documentation/git-fsck.txt b/Documentation/git-fsck.txt index 5088783..29318ea 100644 --- a/Documentation/git-fsck.txt +++ b/Documentation/git-fsck.txt @@ -107,6 +107,8 @@ care about this output and want to speed it up further. CONFIGURATION ------------- +include::includes/cmd-config-section-all.txt[] + include::config/fsck.txt[] DISCUSSION diff --git a/Documentation/git-gc.txt b/Documentation/git-gc.txt index 0af7540..a65c9aa 100644 --- a/Documentation/git-gc.txt +++ b/Documentation/git-gc.txt @@ -110,8 +110,7 @@ users and their repositories. CONFIGURATION ------------- -The below documentation is the same as what's found in -linkgit:git-config[1]: +include::includes/cmd-config-section-all.txt[] include::config/gc.txt[] diff --git a/Documentation/git-imap-send.txt b/Documentation/git-imap-send.txt index 63cf498..f7b1851 100644 --- a/Documentation/git-imap-send.txt +++ b/Documentation/git-imap-send.txt @@ -54,6 +54,8 @@ CONFIGURATION To use the tool, `imap.folder` and either `imap.tunnel` or `imap.host` must be set to appropriate values. +include::includes/cmd-config-section-rest.txt[] + include::config/imap.txt[] EXAMPLES diff --git a/Documentation/git-merge.txt b/Documentation/git-merge.txt index 3125473..6e5db8e 100644 --- a/Documentation/git-merge.txt +++ b/Documentation/git-merge.txt @@ -386,13 +386,16 @@ include::merge-strategies.txt[] CONFIGURATION ------------- -include::config/merge.txt[] branch..mergeOptions:: Sets default options for merging into branch . The syntax and supported options are the same as those of 'git merge', but option values containing whitespace characters are currently not supported. +include::includes/cmd-config-section-rest.txt[] + +include::config/merge.txt[] + SEE ALSO -------- linkgit:git-fmt-merge-msg[1], linkgit:git-pull[1], diff --git a/Documentation/git-mergetool.txt b/Documentation/git-mergetool.txt index f784027..c44e205 100644 --- a/Documentation/git-mergetool.txt +++ b/Documentation/git-mergetool.txt @@ -102,6 +102,9 @@ success of the resolution after the custom tool has exited. CONFIGURATION ------------- :git-mergetool: 1 + +include::includes/cmd-config-section-all.txt[] + include::config/mergetool.txt[] TEMPORARY FILES diff --git a/Documentation/git-rebase.txt b/Documentation/git-rebase.txt index a872ab0..d9b6af8 100644 --- a/Documentation/git-rebase.txt +++ b/Documentation/git-rebase.txt @@ -1252,6 +1252,8 @@ merge cmake CONFIGURATION ------------- +include::includes/cmd-config-section-all.txt[] + include::config/rebase.txt[] include::config/sequencer.txt[] diff --git a/Documentation/includes/cmd-config-section-all.txt b/Documentation/includes/cmd-config-section-all.txt new file mode 100644 index 0000000..296a239 --- /dev/null +++ b/Documentation/includes/cmd-config-section-all.txt @@ -0,0 +1,3 @@ +Everything below this line in this section is selectively included +from the linkgit:git-config[1] documentation. The content is the same +as what's found there: diff --git a/Documentation/includes/cmd-config-section-rest.txt b/Documentation/includes/cmd-config-section-rest.txt new file mode 100644 index 0000000..b1e7682 --- /dev/null +++ b/Documentation/includes/cmd-config-section-rest.txt @@ -0,0 +1,3 @@ +Everything above this line in this section isn't included from the +linkgit:git-config[1] documentation. The content that follows is the +same as what's found there: -- cgit v0.10.2-6-g49f6 From a2811dd7c46a5671735fefb39924569880bb24db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=86var=20Arnfj=C3=B6r=C3=B0=20Bjarmason?= Date: Wed, 7 Sep 2022 10:26:58 +0200 Subject: grep docs: de-duplicate configuration sections MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Include the "config/grep.txt" file in "git-grep.txt", instead of repeating an almost identical description of the "grep" configuration variables in two places. There is no loss of information here that isn't shown in the addition to "grep.txt". This change was made by copying the contents of "git-grep.txt"'s version over the "grep.txt" version. Aside from the change "grep.txt" being made here the two were identical. This documentation started being copy/pasted around in b22520a37c8 (grep: allow -E and -n to be turned on by default via configuration, 2011-03-30). After that in e.g. 6453f7b3486 (grep: add grep.fullName config variable, 2014-03-17) they started drifting apart, with only grep.fullName being described in the command documentation. In 434e6e753fe (config.txt: move grep.* to a separate file, 2018-10-27) we gained the include, but didn't do this next step, let's do it now. Signed-off-by: Ævar Arnfjörð Bjarmason Reviewed-by: Matheus Tavares Signed-off-by: Junio C Hamano diff --git a/Documentation/config/grep.txt b/Documentation/config/grep.txt index 182edd8..e521f20 100644 --- a/Documentation/config/grep.txt +++ b/Documentation/config/grep.txt @@ -17,8 +17,11 @@ grep.extendedRegexp:: other than 'default'. grep.threads:: - Number of grep worker threads to use. - See `grep.threads` in linkgit:git-grep[1] for more information. + Number of grep worker threads to use. If unset (or set to 0), Git will + use as many threads as the number of logical cores available. + +grep.fullName:: + If set to true, enable `--full-name` option by default. grep.fallbackToNoIndex:: If set to true, fall back to git grep --no-index if git grep diff --git a/Documentation/git-grep.txt b/Documentation/git-grep.txt index 58d944b..dabdbe8 100644 --- a/Documentation/git-grep.txt +++ b/Documentation/git-grep.txt @@ -343,34 +343,9 @@ performance in this case, it might be desirable to use `--threads=1`. CONFIGURATION ------------- -grep.lineNumber:: - If set to true, enable `-n` option by default. - -grep.column:: - If set to true, enable the `--column` option by default. - -grep.patternType:: - Set the default matching behavior. Using a value of 'basic', 'extended', - 'fixed', or 'perl' will enable the `--basic-regexp`, `--extended-regexp`, - `--fixed-strings`, or `--perl-regexp` option accordingly, while the - value 'default' will return to the default matching behavior. - -grep.extendedRegexp:: - If set to true, enable `--extended-regexp` option by default. This - option is ignored when the `grep.patternType` option is set to a value - other than 'default'. - -grep.threads:: - Number of grep worker threads to use. If unset (or set to 0), Git will - use as many threads as the number of logical cores available. - -grep.fullName:: - If set to true, enable `--full-name` option by default. - -grep.fallbackToNoIndex:: - If set to true, fall back to git grep --no-index if git grep - is executed outside of a git repository. Defaults to false. +include::includes/cmd-config-section-all.txt[] +include::config/grep.txt[] GIT --- -- cgit v0.10.2-6-g49f6 From bac1d52cfe1f6bdc0f52df3bc32023ed17966e81 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=86var=20Arnfj=C3=B6r=C3=B0=20Bjarmason?= Date: Wed, 7 Sep 2022 10:26:59 +0200 Subject: send-email docs: de-duplicate configuration sections MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit De-duplicate the discussion of "send-email" configuration, such that the "git-config(1)" manual page becomes the source of truth, and "git-send-email(1)" includes the relevant part. Most commands that suffered from such duplication had diverging text discussing the same variables, but in this case some config was also only discussed in one or the other. This is mostly a move-only change, the exception is a minor rewording of changing wording like "see above" to "see linkgit:git-config[1]", as well as a clarification about the big section of command-line option tweaking config being discussed in git-send-email(1)'s main docs. Signed-off-by: Ævar Arnfjörð Bjarmason Reviewed-by: Matheus Tavares Signed-off-by: Junio C Hamano diff --git a/Documentation/config/sendemail.txt b/Documentation/config/sendemail.txt index 50baa5d..51da708 100644 --- a/Documentation/config/sendemail.txt +++ b/Documentation/config/sendemail.txt @@ -18,17 +18,49 @@ sendemail..*:: identity is selected, through either the command-line or `sendemail.identity`. +sendemail.multiEdit:: + If true (default), a single editor instance will be spawned to edit + files you have to edit (patches when `--annotate` is used, and the + summary when `--compose` is used). If false, files will be edited one + after the other, spawning a new editor each time. + +sendemail.confirm:: + Sets the default for whether to confirm before sending. Must be + one of 'always', 'never', 'cc', 'compose', or 'auto'. See `--confirm` + in the linkgit:git-send-email[1] documentation for the meaning of these + values. + sendemail.aliasesFile:: + To avoid typing long email addresses, point this to one or more + email aliases files. You must also supply `sendemail.aliasFileType`. + sendemail.aliasFileType:: + Format of the file(s) specified in sendemail.aliasesFile. Must be + one of 'mutt', 'mailrc', 'pine', 'elm', or 'gnus', or 'sendmail'. ++ +What an alias file in each format looks like can be found in +the documentation of the email program of the same name. The +differences and limitations from the standard formats are +described below: ++ +-- +sendmail;; +* Quoted aliases and quoted addresses are not supported: lines that + contain a `"` symbol are ignored. +* Redirection to a file (`/path/name`) or pipe (`|command`) is not + supported. +* File inclusion (`:include: /path/name`) is not supported. +* Warnings are printed on the standard error output for any + explicitly unsupported constructs, and any other lines that are not + recognized by the parser. +-- sendemail.annotate:: sendemail.bcc:: sendemail.cc:: sendemail.ccCmd:: sendemail.chainReplyTo:: -sendemail.confirm:: sendemail.envelopeSender:: sendemail.from:: -sendemail.multiEdit:: sendemail.signedoffbycc:: sendemail.smtpPass:: sendemail.suppresscc:: @@ -44,7 +76,9 @@ sendemail.thread:: sendemail.transferEncoding:: sendemail.validate:: sendemail.xmailer:: - See linkgit:git-send-email[1] for description. + These configuration variables all provide a default for + linkgit:git-send-email[1] command-line options. See its + documentation for details. sendemail.signedoffcc (deprecated):: Deprecated alias for `sendemail.signedoffbycc`. diff --git a/Documentation/git-send-email.txt b/Documentation/git-send-email.txt index 41cd8cb..3290043 100644 --- a/Documentation/git-send-email.txt +++ b/Documentation/git-send-email.txt @@ -456,41 +456,9 @@ Information CONFIGURATION ------------- -sendemail.aliasesFile:: - To avoid typing long email addresses, point this to one or more - email aliases files. You must also supply `sendemail.aliasFileType`. +include::includes/cmd-config-section-all.txt[] -sendemail.aliasFileType:: - Format of the file(s) specified in sendemail.aliasesFile. Must be - one of 'mutt', 'mailrc', 'pine', 'elm', or 'gnus', or 'sendmail'. -+ -What an alias file in each format looks like can be found in -the documentation of the email program of the same name. The -differences and limitations from the standard formats are -described below: -+ --- -sendmail;; -* Quoted aliases and quoted addresses are not supported: lines that - contain a `"` symbol are ignored. -* Redirection to a file (`/path/name`) or pipe (`|command`) is not - supported. -* File inclusion (`:include: /path/name`) is not supported. -* Warnings are printed on the standard error output for any - explicitly unsupported constructs, and any other lines that are not - recognized by the parser. --- - -sendemail.multiEdit:: - If true (default), a single editor instance will be spawned to edit - files you have to edit (patches when `--annotate` is used, and the - summary when `--compose` is used). If false, files will be edited one - after the other, spawning a new editor each time. - -sendemail.confirm:: - Sets the default for whether to confirm before sending. Must be - one of 'always', 'never', 'cc', 'compose', or 'auto'. See `--confirm` - in the previous section for the meaning of these values. +include::config/sendemail.txt[] EXAMPLES -------- -- cgit v0.10.2-6-g49f6 From 416fed246ffaed4cafb9c35e38d1402704a377be Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=86var=20Arnfj=C3=B6r=C3=B0=20Bjarmason?= Date: Wed, 7 Sep 2022 10:27:00 +0200 Subject: apply docs: de-duplicate configuration sections MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The wording is not identical to Documentation/config/apply.txt, but that version is better. Signed-off-by: Ævar Arnfjörð Bjarmason Reviewed-by: Matheus Tavares Signed-off-by: Junio C Hamano diff --git a/Documentation/git-apply.txt b/Documentation/git-apply.txt index b6d77f4..1d478cb 100644 --- a/Documentation/git-apply.txt +++ b/Documentation/git-apply.txt @@ -263,13 +263,9 @@ has no effect when `--index` or `--cached` is in use. CONFIGURATION ------------- -apply.ignoreWhitespace:: - Set to 'change' if you want changes in whitespace to be ignored by default. - Set to one of: no, none, never, false if you want changes in - whitespace to be significant. -apply.whitespace:: - When no `--whitespace` flag is given from the command - line, this configuration item is used as the default. +include::includes/cmd-config-section-all.txt[] + +include::config/apply.txt[] SUBMODULES ---------- -- cgit v0.10.2-6-g49f6 From 5bd277e2e2059840cda807de511f02c291e039c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=86var=20Arnfj=C3=B6r=C3=B0=20Bjarmason?= Date: Wed, 7 Sep 2022 10:27:01 +0200 Subject: notes docs: de-duplicate and combine configuration sections MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Combine the various "notes" configuration sections spread across Documentation/config/notes.txt and Documentation/git-notes.txt to live in the former, and to be included in the latter. We'll now forward link from "git notes" to the "CONFIGURATION" section below, rather than to "git-config(1)" when discussing configuration variables that are (also) discussed in that section. Signed-off-by: Ævar Arnfjörð Bjarmason Reviewed-by: Matheus Tavares Signed-off-by: Junio C Hamano diff --git a/Documentation/config/notes.txt b/Documentation/config/notes.txt index aeef56d..c7c4811 100644 --- a/Documentation/config/notes.txt +++ b/Documentation/config/notes.txt @@ -3,6 +3,9 @@ notes.mergeStrategy:: conflicts. Must be one of `manual`, `ours`, `theirs`, `union`, or `cat_sort_uniq`. Defaults to `manual`. See "NOTES MERGE STRATEGIES" section of linkgit:git-notes[1] for more information on each strategy. ++ +This setting can be overridden by passing the `--strategy` option to +linkgit:git-notes[1]. notes..mergeStrategy:: Which merge strategy to choose when doing a notes merge into @@ -11,28 +14,35 @@ notes..mergeStrategy:: linkgit:git-notes[1] for more information on the available strategies. notes.displayRef:: - The (fully qualified) refname from which to show notes when - showing commit messages. The value of this variable can be set - to a glob, in which case notes from all matching refs will be - shown. You may also specify this configuration variable - several times. A warning will be issued for refs that do not - exist, but a glob that does not match any refs is silently - ignored. + Which ref (or refs, if a glob or specified more than once), in + addition to the default set by `core.notesRef` or + `GIT_NOTES_REF`, to read notes from when showing commit + messages with the 'git log' family of commands. + This setting can be overridden with the `GIT_NOTES_DISPLAY_REF` environment variable, which must be a colon separated list of refs or globs. + +A warning will be issued for refs that do not exist, +but a glob that does not match any refs is silently ignored. ++ +This setting can be disabled by the `--no-notes` option to the 'git +log' family of commands, or by the `--notes=` option accepted by +those commands. ++ The effective value of "core.notesRef" (possibly overridden by GIT_NOTES_REF) is also implicitly added to the list of refs to be displayed. notes.rewrite.:: When rewriting commits with (currently `amend` or - `rebase`) and this variable is set to `true`, Git - automatically copies your notes from the original to the - rewritten commit. Defaults to `true`, but see - "notes.rewriteRef" below. + `rebase`), if this variable is `false`, git will not copy + notes from the original to the rewritten commit. Defaults to + `true`. See also "`notes.rewriteRef`" below. ++ +This setting can be overridden with the `GIT_NOTES_REWRITE_REF` +environment variable, which must be a colon separated list of refs or +globs. notes.rewriteMode:: When copying notes during a rewrite (see the @@ -46,14 +56,13 @@ environment variable. notes.rewriteRef:: When copying notes during a rewrite, specifies the (fully - qualified) ref whose notes should be copied. The ref may be a - glob, in which case notes in all matching refs will be copied. - You may also specify this configuration several times. + qualified) ref whose notes should be copied. May be a glob, + in which case notes in all matching refs will be copied. You + may also specify this configuration several times. + Does not have a default value; you must configure this variable to enable note rewriting. Set it to `refs/notes/commits` to enable rewriting for the default commit notes. + -This setting can be overridden with the `GIT_NOTES_REWRITE_REF` -environment variable, which must be a colon separated list of refs or -globs. +Can be overridden with the `GIT_NOTES_REWRITE_REF` environment variable. +See `notes.rewrite.` above for a further description of its format. diff --git a/Documentation/git-log.txt b/Documentation/git-log.txt index 20e87ce..ed802bb 100644 --- a/Documentation/git-log.txt +++ b/Documentation/git-log.txt @@ -227,19 +227,9 @@ log.showSignature:: mailmap.*:: See linkgit:git-shortlog[1]. -notes.displayRef:: - Which refs, in addition to the default set by `core.notesRef` - or `GIT_NOTES_REF`, to read notes from when showing commit - messages with the `log` family of commands. See - linkgit:git-notes[1]. -+ -May be an unabbreviated ref name or a glob and may be specified -multiple times. A warning will be issued for refs that do not exist, -but a glob that does not match any refs is silently ignored. -+ -This setting can be disabled by the `--no-notes` option, -overridden by the `GIT_NOTES_DISPLAY_REF` environment variable, -and overridden by the `--notes=` option. +include::includes/cmd-config-section-rest.txt[] + +include::config/notes.txt[] GIT --- diff --git a/Documentation/git-notes.txt b/Documentation/git-notes.txt index 0a42006..efbc10f 100644 --- a/Documentation/git-notes.txt +++ b/Documentation/git-notes.txt @@ -44,7 +44,7 @@ using the `--notes` option. Such notes are added as a patch commentary after a three dash separator line. To change which notes are shown by 'git log', see the -"notes.displayRef" configuration in linkgit:git-log[1]. +"notes.displayRef" discussion in <>. See the "notes.rewrite." configuration for a way to carry notes across commands that rewrite commits. @@ -307,6 +307,7 @@ with 'git log', so if you use such notes, you'll probably need to write some special-purpose tools to do something useful with them. +[[CONFIGURATION]] CONFIGURATION ------------- @@ -316,57 +317,9 @@ core.notesRef:: This setting can be overridden through the environment and command line. -notes.mergeStrategy:: - Which merge strategy to choose by default when resolving notes - conflicts. Must be one of `manual`, `ours`, `theirs`, `union`, or - `cat_sort_uniq`. Defaults to `manual`. See "NOTES MERGE STRATEGIES" - section above for more information on each strategy. -+ -This setting can be overridden by passing the `--strategy` option. - -notes..mergeStrategy:: - Which merge strategy to choose when doing a notes merge into - refs/notes/. This overrides the more general - "notes.mergeStrategy". See the "NOTES MERGE STRATEGIES" section above - for more information on each available strategy. - -notes.displayRef:: - Which ref (or refs, if a glob or specified more than once), in - addition to the default set by `core.notesRef` or - `GIT_NOTES_REF`, to read notes from when showing commit - messages with the 'git log' family of commands. - This setting can be overridden on the command line or by the - `GIT_NOTES_DISPLAY_REF` environment variable. - See linkgit:git-log[1]. - -notes.rewrite.:: - When rewriting commits with (currently `amend` or - `rebase`), if this variable is `false`, git will not copy - notes from the original to the rewritten commit. Defaults to - `true`. See also "`notes.rewriteRef`" below. -+ -This setting can be overridden by the `GIT_NOTES_REWRITE_REF` -environment variable. +include::includes/cmd-config-section-rest.txt[] -notes.rewriteMode:: - When copying notes during a rewrite, what to do if the target - commit already has a note. Must be one of `overwrite`, - `concatenate`, `cat_sort_uniq`, or `ignore`. Defaults to - `concatenate`. -+ -This setting can be overridden with the `GIT_NOTES_REWRITE_MODE` -environment variable. - -notes.rewriteRef:: - When copying notes during a rewrite, specifies the (fully - qualified) ref whose notes should be copied. May be a glob, - in which case notes in all matching refs will be copied. You - may also specify this configuration several times. -+ -Does not have a default value; you must configure this variable to -enable note rewriting. -+ -Can be overridden with the `GIT_NOTES_REWRITE_REF` environment variable. +include::config/notes.txt[] ENVIRONMENT -- cgit v0.10.2-6-g49f6 From 2a9dfdf260db304763e4db159921565feeedef40 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=86var=20Arnfj=C3=B6r=C3=B0=20Bjarmason?= Date: Wed, 7 Sep 2022 10:27:02 +0200 Subject: difftool docs: de-duplicate configuration sections MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Include the "config/difftool.txt" file in "git-difftool.txt", and move the relevant part of git-difftool(1) configuration from "config/diff.txt" to config/difftool.txt". Doing this is slightly odd, as we usually discuss configuration in alphabetical order, but by doing it we're able to include the full set of configuration used by git-difftool(1) (and only that configuration) in its own documentation. Signed-off-by: Ævar Arnfjörð Bjarmason Reviewed-by: Matheus Tavares Signed-off-by: Junio C Hamano diff --git a/Documentation/config/diff.txt b/Documentation/config/diff.txt index 32f8483..35a7bf8 100644 --- a/Documentation/config/diff.txt +++ b/Documentation/config/diff.txt @@ -178,21 +178,6 @@ diff..cachetextconv:: Set this option to true to make the diff driver cache the text conversion outputs. See linkgit:gitattributes[5] for details. -diff.tool:: - Controls which diff tool is used by linkgit:git-difftool[1]. - This variable overrides the value configured in `merge.tool`. - The list below shows the valid built-in values. - Any other value is treated as a custom diff tool and requires - that a corresponding difftool..cmd variable is defined. - -diff.guitool:: - Controls which diff tool is used by linkgit:git-difftool[1] when - the -g/--gui flag is specified. This variable overrides the value - configured in `merge.guitool`. The list below shows the valid - built-in values. Any other value is treated as a custom diff tool - and requires that a corresponding difftool..cmd variable - is defined. - include::../mergetools-diff.txt[] diff.indentHeuristic:: diff --git a/Documentation/config/difftool.txt b/Documentation/config/difftool.txt index 6762594..a3f8211 100644 --- a/Documentation/config/difftool.txt +++ b/Documentation/config/difftool.txt @@ -1,6 +1,17 @@ -difftool..path:: - Override the path for the given tool. This is useful in case - your tool is not in the PATH. +diff.tool:: + Controls which diff tool is used by linkgit:git-difftool[1]. + This variable overrides the value configured in `merge.tool`. + The list below shows the valid built-in values. + Any other value is treated as a custom diff tool and requires + that a corresponding difftool..cmd variable is defined. + +diff.guitool:: + Controls which diff tool is used by linkgit:git-difftool[1] when + the -g/--gui flag is specified. This variable overrides the value + configured in `merge.guitool`. The list below shows the valid + built-in values. Any other value is treated as a custom diff tool + and requires that a corresponding difftool..cmd variable + is defined. difftool..cmd:: Specify the command to invoke the specified diff tool. @@ -9,6 +20,17 @@ difftool..cmd:: file containing the contents of the diff pre-image and 'REMOTE' is set to the name of the temporary file containing the contents of the diff post-image. ++ +See the `--tool=` option in linkgit:git-difftool[1] for more details. + +difftool..path:: + Override the path for the given tool. This is useful in case + your tool is not in the PATH. + +difftool.trustExitCode:: + Exit difftool if the invoked diff tool returns a non-zero exit status. ++ +See the `--trust-exit-code` option in linkgit:git-difftool[1] for more details. difftool.prompt:: Prompt before each invocation of the diff tool. diff --git a/Documentation/git-difftool.txt b/Documentation/git-difftool.txt index 143b0c4..9d14c3c 100644 --- a/Documentation/git-difftool.txt +++ b/Documentation/git-difftool.txt @@ -113,33 +113,14 @@ instead. `--no-symlinks` is the default on Windows. See linkgit:git-diff[1] for the full list of supported options. -CONFIG VARIABLES ----------------- +CONFIGURATION +------------- 'git difftool' falls back to 'git mergetool' config variables when the difftool equivalents have not been defined. -diff.tool:: - The default diff tool to use. +include::includes/cmd-config-section-rest.txt[] -diff.guitool:: - The default diff tool to use when `--gui` is specified. - -difftool..path:: - Override the path for the given tool. This is useful in case - your tool is not in the PATH. - -difftool..cmd:: - Specify the command to invoke the specified diff tool. -+ -See the `--tool=` option above for more details. - -difftool.prompt:: - Prompt before each invocation of the diff tool. - -difftool.trustExitCode:: - Exit difftool if the invoked diff tool returns a non-zero exit status. -+ -See the `--trust-exit-code` option above for more details. +include::config/difftool.txt[] SEE ALSO -------- -- cgit v0.10.2-6-g49f6 From 00c80534f63bc27e11e2f17a8623af142ac122c0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=86var=20Arnfj=C3=B6r=C3=B0=20Bjarmason?= Date: Wed, 7 Sep 2022 10:27:03 +0200 Subject: log docs: de-duplicate configuration sections MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Ævar Arnfjörð Bjarmason Reviewed-by: Matheus Tavares Signed-off-by: Junio C Hamano diff --git a/Documentation/config/log.txt b/Documentation/config/log.txt index 456eb07..f2ea11c 100644 --- a/Documentation/config/log.txt +++ b/Documentation/config/log.txt @@ -7,6 +7,10 @@ log.date:: Set the default date-time mode for the 'log' command. Setting a value for log.date is similar to using 'git log''s `--date` option. See linkgit:git-log[1] for details. ++ +If the format is set to "auto:foo" and the pager is in use, format +"foo" will be the used for the date format. Otherwise "default" will +be used. log.decorate:: Print out the ref names of any commits that are shown by the log diff --git a/Documentation/git-log.txt b/Documentation/git-log.txt index ed802bb..1e6b918 100644 --- a/Documentation/git-log.txt +++ b/Documentation/git-log.txt @@ -199,36 +199,10 @@ i18n.logOutputEncoding:: Defaults to the value of `i18n.commitEncoding` if set, and UTF-8 otherwise. -log.date:: - Default format for human-readable dates. (Compare the - `--date` option.) Defaults to "default", which means to write - dates like `Sat May 8 19:35:34 2010 -0500`. -+ -If the format is set to "auto:foo" and the pager is in use, format -"foo" will be the used for the date format. Otherwise "default" will -be used. - -log.follow:: - If `true`, `git log` will act as if the `--follow` option was used when - a single is given. This has the same limitations as `--follow`, - i.e. it cannot be used to follow multiple files and does not work well - on non-linear history. - -log.showRoot:: - If `false`, `git log` and related commands will not treat the - initial commit as a big creation event. Any root commits in - `git log -p` output would be shown without a diff attached. - The default is `true`. - -log.showSignature:: - If `true`, `git log` and related commands will act as if the - `--show-signature` option was passed to them. - -mailmap.*:: - See linkgit:git-shortlog[1]. - include::includes/cmd-config-section-rest.txt[] +include::config/log.txt[] + include::config/notes.txt[] GIT -- cgit v0.10.2-6-g49f6 From 16f6b0d1aa598d665ada827cf89bda2112853680 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=86var=20Arnfj=C3=B6r=C3=B0=20Bjarmason?= Date: Wed, 7 Sep 2022 10:27:04 +0200 Subject: docs: add CONFIGURATION sections that map to a built-in MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add a CONFIGURATION section to the documentation of various built-ins, for those cases where the relevant config/NAME.txt describes configuration that is only used by the relevant built-in documented in git-NAME.txt. Subsequent commits will handle more complex cases. Signed-off-by: Ævar Arnfjörð Bjarmason Reviewed-by: Matheus Tavares Signed-off-by: Junio C Hamano diff --git a/Documentation/git-add.txt b/Documentation/git-add.txt index 11eb70f..36da8bf 100644 --- a/Documentation/git-add.txt +++ b/Documentation/git-add.txt @@ -431,6 +431,13 @@ they will make the patch impossible to apply: * deleting context or removal lines * modifying the contents of context or removal lines +CONFIGURATION +------------- + +include::includes/cmd-config-section-all.txt[] + +include::config/add.txt[] + SEE ALSO -------- linkgit:git-status[1] diff --git a/Documentation/git-am.txt b/Documentation/git-am.txt index 09107fb..7ccb46b 100644 --- a/Documentation/git-am.txt +++ b/Documentation/git-am.txt @@ -261,6 +261,13 @@ This command can run `applypatch-msg`, `pre-applypatch`, and `post-applypatch` hooks. See linkgit:githooks[5] for more information. +CONFIGURATION +------------- + +include::includes/cmd-config-section-all.txt[] + +include::config/am.txt[] + SEE ALSO -------- linkgit:git-apply[1]. diff --git a/Documentation/git-clean.txt b/Documentation/git-clean.txt index a7f309d..9174263 100644 --- a/Documentation/git-clean.txt +++ b/Documentation/git-clean.txt @@ -133,6 +133,13 @@ help:: Show brief usage of interactive git-clean. +CONFIGURATION +------------- + +include::includes/cmd-config-section-all.txt[] + +include::config/clean.txt[] + SEE ALSO -------- linkgit:gitignore[5] diff --git a/Documentation/git-clone.txt b/Documentation/git-clone.txt index 632bd13..b9ee8a8 100644 --- a/Documentation/git-clone.txt +++ b/Documentation/git-clone.txt @@ -363,6 +363,13 @@ $ cd my-linux $ git clone --bare -l /home/proj/.git /pub/scm/proj.git ------------ +CONFIGURATION +------------- + +include::includes/cmd-config-section-all.txt[] + +include::config/clone.txt[] + GIT --- diff --git a/Documentation/git-commit-graph.txt b/Documentation/git-commit-graph.txt index e1f48c9..5225f67 100644 --- a/Documentation/git-commit-graph.txt +++ b/Documentation/git-commit-graph.txt @@ -142,6 +142,13 @@ $ git show-ref -s | git commit-graph write --stdin-commits $ git rev-parse HEAD | git commit-graph write --stdin-commits --append ------------------------------------------------ +CONFIGURATION +------------- + +include::includes/cmd-config-section-all.txt[] + +include::config/commitgraph.txt[] + GIT --- diff --git a/Documentation/git-commit.txt b/Documentation/git-commit.txt index 6c60bf9..225c6c9 100644 --- a/Documentation/git-commit.txt +++ b/Documentation/git-commit.txt @@ -557,6 +557,10 @@ The editor used to edit the commit log message will be chosen from the `VISUAL` environment variable, or the `EDITOR` environment variable (in that order). See linkgit:git-var[1] for details. +include::includes/cmd-config-section-rest.txt[] + +include::config/commit.txt[] + HOOKS ----- This command can run `commit-msg`, `prepare-commit-msg`, `pre-commit`, diff --git a/Documentation/git-fast-import.txt b/Documentation/git-fast-import.txt index 39cfa05..8b5dd6a 100644 --- a/Documentation/git-fast-import.txt +++ b/Documentation/git-fast-import.txt @@ -1564,6 +1564,13 @@ operator can use this facility to peek at the objects and refs from an import in progress, at the cost of some added running time and worse compression. +CONFIGURATION +------------- + +include::includes/cmd-config-section-all.txt[] + +include::config/fastimport.txt[] + SEE ALSO -------- linkgit:git-fast-export[1] diff --git a/Documentation/git-mailinfo.txt b/Documentation/git-mailinfo.txt index 3fcfd96..2806028 100644 --- a/Documentation/git-mailinfo.txt +++ b/Documentation/git-mailinfo.txt @@ -115,6 +115,13 @@ If no such configuration option has been set, `warn` will be used. :: The patch extracted from e-mail. +CONFIGURATION +------------- + +include::includes/cmd-config-section-all.txt[] + +include::config/mailinfo.txt[] + GIT --- Part of the linkgit:git[1] suite diff --git a/Documentation/git-maintenance.txt b/Documentation/git-maintenance.txt index e56bad2..9c630ef 100644 --- a/Documentation/git-maintenance.txt +++ b/Documentation/git-maintenance.txt @@ -397,6 +397,13 @@ If you want to customize the background tasks, please rename the tasks so future calls to `git maintenance (start|stop)` do not overwrite your custom tasks. +CONFIGURATION +------------- + +include::includes/cmd-config-section-all.txt[] + +include::config/maintenance.txt[] + GIT --- diff --git a/Documentation/git-push.txt b/Documentation/git-push.txt index 2f25aa3..def7657 100644 --- a/Documentation/git-push.txt +++ b/Documentation/git-push.txt @@ -692,6 +692,13 @@ a `git gc` command on the origin repository. include::transfer-data-leaks.txt[] +CONFIGURATION +------------- + +include::includes/cmd-config-section-all.txt[] + +include::config/push.txt[] + GIT --- Part of the linkgit:git[1] suite diff --git a/Documentation/git-revert.txt b/Documentation/git-revert.txt index 8463fe9..700f937 100644 --- a/Documentation/git-revert.txt +++ b/Documentation/git-revert.txt @@ -145,6 +145,13 @@ EXAMPLES changes. The revert only modifies the working tree and the index. +CONFIGURATION +------------- + +include::includes/cmd-config-section-all.txt[] + +include::config/revert.txt[] + SEE ALSO -------- linkgit:git-cherry-pick[1] diff --git a/Documentation/git-show-branch.txt b/Documentation/git-show-branch.txt index 5cc2fce..e5ec6b4 100644 --- a/Documentation/git-show-branch.txt +++ b/Documentation/git-show-branch.txt @@ -199,6 +199,13 @@ shows 10 reflog entries going back from the tip as of 1 hour ago. Without `--list`, the output also shows how these tips are topologically related with each other. +CONFIGURATION +------------- + +include::includes/cmd-config-section-all.txt[] + +include::config/showbranch.txt[] + GIT --- Part of the linkgit:git[1] suite diff --git a/Documentation/git-stash.txt b/Documentation/git-stash.txt index 6e15f47..c5d7091 100644 --- a/Documentation/git-stash.txt +++ b/Documentation/git-stash.txt @@ -382,6 +382,13 @@ grep commit | cut -d\ -f3 | xargs git log --merges --no-walk --grep=WIP ---------------------------------------------------------------- +CONFIGURATION +------------- + +include::includes/cmd-config-section-all.txt[] + +include::config/stash.txt[] + SEE ALSO -------- -- cgit v0.10.2-6-g49f6 From 9274dea3d95365c1ed0cd5ef46a9b677ae5c478f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=86var=20Arnfj=C3=B6r=C3=B0=20Bjarmason?= Date: Wed, 7 Sep 2022 10:27:05 +0200 Subject: docs: add CONFIGURATION sections that fuzzy map to built-ins MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add a CONFIGURATION section to the documentation of various built-ins, for those cases where the relevant config/NAME.txt doesn't map only to one git-NAME.txt. In particular: * config/blame.txt: used by git-{blame,annotate}.txt. Since the git-annotate(1) documentation refers to git-blame(1) don't add a "CONFIGURATION" section to git-annotate(1), only to git-blame(1). * config/checkout.txt: maps to both git-checkout.txt and git-switch.txt (but nothing else). * config/init.txt: should be included in git-init(1) and git-clone(1). * config/column.txt: We should ideally mention the relevant subset of this in git-{branch,clean,status,tag}.txt, but let's punt on it for now. We will when we eventually split these sort of files into e.g. config/column.txt and config/column/{branch,clean,status,tag}.txt, with the former including the latter set. Things that are being left out, and why: * config/{remote,remotes,credential}.txt: Configuration that affects how we talk to remote repositories is harder to untangle. We'll need to include some of this in git-{fetch,remote,push,ls-remote}.txt etc., but some of those only use a small subset of these options. Let's leave this for now. Signed-off-by: Ævar Arnfjörð Bjarmason Reviewed-by: Matheus Tavares Signed-off-by: Junio C Hamano diff --git a/Documentation/git-blame.txt b/Documentation/git-blame.txt index d7a46cc..4400a17 100644 --- a/Documentation/git-blame.txt +++ b/Documentation/git-blame.txt @@ -241,6 +241,12 @@ MAPPING AUTHORS See linkgit:gitmailmap[5]. +CONFIGURATION +------------- + +include::includes/cmd-config-section-all.txt[] + +include::config/blame.txt[] SEE ALSO -------- diff --git a/Documentation/git-branch.txt b/Documentation/git-branch.txt index ae82378..12c5f84 100644 --- a/Documentation/git-branch.txt +++ b/Documentation/git-branch.txt @@ -336,6 +336,10 @@ CONFIGURATION `--list` is used or implied. The default is to use a pager. See linkgit:git-config[1]. +include::includes/cmd-config-section-rest.txt[] + +include::config/branch.txt[] + EXAMPLES -------- diff --git a/Documentation/git-checkout.txt b/Documentation/git-checkout.txt index 9f37e22..4cb9d55 100644 --- a/Documentation/git-checkout.txt +++ b/Documentation/git-checkout.txt @@ -600,6 +600,13 @@ $ edit frotz $ git add frotz ------------ +CONFIGURATION +------------- + +include::includes/cmd-config-section-all.txt[] + +include::config/checkout.txt[] + SEE ALSO -------- linkgit:git-switch[1], diff --git a/Documentation/git-clone.txt b/Documentation/git-clone.txt index b9ee8a8..43955a3 100644 --- a/Documentation/git-clone.txt +++ b/Documentation/git-clone.txt @@ -368,6 +368,8 @@ CONFIGURATION include::includes/cmd-config-section-all.txt[] +include::config/init.txt[] + include::config/clone.txt[] diff --git a/Documentation/git-column.txt b/Documentation/git-column.txt index 6cea9ab..1843164 100644 --- a/Documentation/git-column.txt +++ b/Documentation/git-column.txt @@ -74,6 +74,13 @@ v2.4.3 v2.4.4 v2.4.5 v2.4.6 v2.4.7 v2.4.8 v2.4.9 ------------ +CONFIGURATION +------------- + +include::includes/cmd-config-section-all.txt[] + +include::config/column.txt[] + GIT --- Part of the linkgit:git[1] suite diff --git a/Documentation/git-diff.txt b/Documentation/git-diff.txt index 6236c75..85ae6d6 100644 --- a/Documentation/git-diff.txt +++ b/Documentation/git-diff.txt @@ -213,6 +213,13 @@ $ git diff -R <2> rewrites (very expensive). <2> Output diff in reverse. +CONFIGURATION +------------- + +include::includes/cmd-config-section-all.txt[] + +include::config/diff.txt[] + SEE ALSO -------- diff(1), diff --git a/Documentation/git-fetch.txt b/Documentation/git-fetch.txt index e9d3646..63d9569 100644 --- a/Documentation/git-fetch.txt +++ b/Documentation/git-fetch.txt @@ -285,6 +285,13 @@ linkgit:git-gc[1]). include::transfer-data-leaks.txt[] +CONFIGURATION +------------- + +include::includes/cmd-config-section-all.txt[] + +include::config/fetch.txt[] + BUGS ---- Using --recurse-submodules can only fetch new commits in submodules that are diff --git a/Documentation/git-init.txt b/Documentation/git-init.txt index ad921fe..160dea1 100644 --- a/Documentation/git-init.txt +++ b/Documentation/git-init.txt @@ -169,6 +169,13 @@ $ git commit <3> <2> Add all existing files to the index. <3> Record the pristine state as the first commit in the history. +CONFIGURATION +------------- + +include::includes/cmd-config-section-all.txt[] + +include::config/init.txt[] + GIT --- Part of the linkgit:git[1] suite diff --git a/Documentation/git-switch.txt b/Documentation/git-switch.txt index bbcbdce..c60fc9c 100644 --- a/Documentation/git-switch.txt +++ b/Documentation/git-switch.txt @@ -265,6 +265,13 @@ always create a new name for it (without switching away): $ git switch -c good-surprises ------------ +CONFIGURATION +------------- + +include::includes/cmd-config-section-all.txt[] + +include::config/checkout.txt[] + SEE ALSO -------- linkgit:git-checkout[1], -- cgit v0.10.2-6-g49f6