diff mbox series

[2/3] doc: apply: unify configuration variables definitions

Message ID a25a6d89647638ffd682fb24ef0b5b6c9bed0941.1657819649.git.matheus.bernardino@usp.br (mailing list archive)
State New, archived
Headers show
Series doc: unify config info on some cmds | expand

Commit Message

Matheus Tavares July 14, 2022, 5:44 p.m. UTC
Note that apply.ignoreWhitespace and apply.whitespace are defined with
slightly different wordings at git-apply.txt and config/apply.txt.
Nevertheless, there is no loss of information from using one or the
other, so I kept the latter for the single unified definition.

Signed-off-by: Matheus Tavares <matheus.bernardino@usp.br>
---
 Documentation/config/apply.txt | 7 ++++++-
 Documentation/git-apply.txt    | 9 ++-------
 2 files changed, 8 insertions(+), 8 deletions(-)

Comments

Junio C Hamano July 14, 2022, 6:48 p.m. UTC | #1
Matheus Tavares <matheus.bernardino@usp.br> writes:

> +ifndef::git-apply[]
>  	See linkgit:git-apply[1].
> +endif::git-apply[]
>  
>  apply.whitespace::
>  	Tells 'git apply' how to handle whitespaces, in the same way
> -	as the `--whitespace` option. See linkgit:git-apply[1].
> +	as the `--whitespace` option.
> +ifndef::git-apply[]
> +	See linkgit:git-apply[1].
> +endif::git-apply[]

Makes sense.
diff mbox series

Patch

diff --git a/Documentation/config/apply.txt b/Documentation/config/apply.txt
index 8fb8ef763d..7fb1ae7f8a 100644
--- a/Documentation/config/apply.txt
+++ b/Documentation/config/apply.txt
@@ -4,8 +4,13 @@  apply.ignoreWhitespace::
 	option.
 	When set to one of: no, none, never, false tells 'git apply' to
 	respect all whitespace differences.
+ifndef::git-apply[]
 	See linkgit:git-apply[1].
+endif::git-apply[]
 
 apply.whitespace::
 	Tells 'git apply' how to handle whitespaces, in the same way
-	as the `--whitespace` option. See linkgit:git-apply[1].
+	as the `--whitespace` option.
+ifndef::git-apply[]
+	See linkgit:git-apply[1].
+endif::git-apply[]
diff --git a/Documentation/git-apply.txt b/Documentation/git-apply.txt
index b6d77f4206..7ababdaaa7 100644
--- a/Documentation/git-apply.txt
+++ b/Documentation/git-apply.txt
@@ -263,13 +263,8 @@  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.
+:git-apply: 1
+include::config/apply.txt[]
 
 SUBMODULES
 ----------