diff mbox series

[v2,3/9] send-email docs: de-duplicate configuration sections

Message ID patch-v2-3.9-8138dc54e3e-20220729T081959Z-avarab@gmail.com (mailing list archive)
State Accepted
Commit bac1d52cfe1f6bdc0f52df3bc32023ed17966e81
Headers show
Series docs: de-duplicate sections, add more CONFIGURATION sections | expand

Commit Message

Ævar Arnfjörð Bjarmason July 29, 2022, 8:25 a.m. UTC
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 <avarab@gmail.com>
---
 Documentation/config/sendemail.txt | 40 +++++++++++++++++++++++++++---
 Documentation/git-send-email.txt   | 36 ++-------------------------
 2 files changed, 39 insertions(+), 37 deletions(-)

Comments

Matheus Tavares July 30, 2022, 1:45 p.m. UTC | #1
On Fri, Jul 29, 2022 at 5:26 AM Ævar Arnfjörð Bjarmason
<avarab@gmail.com> wrote:
>
> 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.

Makes sense. And this is easy to review with --color-moved.

> Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
> ---
>  Documentation/config/sendemail.txt | 40 +++++++++++++++++++++++++++---
>  Documentation/git-send-email.txt   | 36 ++-------------------------
>  2 files changed, 39 insertions(+), 37 deletions(-)
>
> diff --git a/Documentation/config/sendemail.txt b/Documentation/config/sendemail.txt
> index 50baa5d6bfb..51da7088a84 100644
> --- a/Documentation/config/sendemail.txt
> +++ b/Documentation/config/sendemail.txt
> [...]
>  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.

Ok, I looked one by one and these are all indeed mentioned in the
git-send-email(1) cli option documentation.

The rest looks good too.
diff mbox series

Patch

diff --git a/Documentation/config/sendemail.txt b/Documentation/config/sendemail.txt
index 50baa5d6bfb..51da7088a84 100644
--- a/Documentation/config/sendemail.txt
+++ b/Documentation/config/sendemail.txt
@@ -18,17 +18,49 @@  sendemail.<identity>.*::
 	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 41cd8cb4247..3290043053a 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
 --------