git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] git-send-email.txt: Add EXAMPLES section. Write 1st level sections in uppercase

From
Michael J Gruber <git@drmicha.warpmail.net>
Date
Apr 16, 2010, 08:01 UTC
Message-ID
<4BC81975.9000907@drmicha.warpmail.net>
In-Reply-To
<1271345823-19685-1-git-send-email-jari.aalto@cante.net>
jari.aalto@cante.net venit, vidit, dixit 15.04.2010 17:37:
Show 23 quoted lines
> From: Jari Aalto <jari.aalto@cante.net>
> 
> 
> Signed-off-by: Jari Aalto <jari.aalto@cante.net>
> ---
>  Documentation/git-send-email.txt |   36 ++++++++++++++++++++++++++++++++++--
>  1 files changed, 34 insertions(+), 2 deletions(-)
> 
> diff --git a/Documentation/git-send-email.txt b/Documentation/git-send-email.txt
> index ced35b2..8b33eb0 100644
> --- a/Documentation/git-send-email.txt
> +++ b/Documentation/git-send-email.txt
> @@ -299,8 +299,40 @@ sendemail.confirm::
>  	one of 'always', 'never', 'cc', 'compose', or 'auto'. See '--confirm'
>  	in the previous section for the meaning of these values.
>  
> +EXAMPLES
> +--------
>  
> -Author
> +To batch send all patches to a mailig list, no copies to oneself,
> +messages in a relaxed single thread format (no nesting) and don't ask
> +any confirmations:
That sentence is linguistically screwed, but...
Show 10 quoted lines
> +
> +	git send-email \
> +		--from $EMAIL \
> +		--to address@list.example.com \
> +		--suppress-cc=author \
> +		--suppress-from \
> +		--no-chain-reply-to \
> +		--confirm=never \
> +		outgoing/
> +

... I don't think this is a good example at all. All options are explained in the man page, so what is the point in listing and explaining some of them here? If we really want an introductory example, we want one with few options, where the default behaviour is explained.

> +Tip: in case the patches in a branch need rework, you might consider
> +adjusting the subjects of each patch to "[PATCH v<number>]" with
> +options '--subject-prefix'. 

That is a git.git convention, and it applies to format-patch, not send-email.

Show 12 quoted lines
> The 'merge-base' inside command
> +substitution is there to find out the initial commit of the branch:
> +
> +	git checkout BRANCH
> +
> +	git format-patch \
> +		--subject-prefix="PATCH v2" \
> +		--signoff \
> +		-M \
> +		--output-directory outgoing/
> +		$(git merge-base HEAD master)..
> +

This is a useful example (although it mixes several issues), but one for format-patch, not send-email. You assume you branched off master. Using @{upstream} might be a more general option.

Show 16 quoted lines
> +Then proceed as in in the first example the send the patches out
> +again.
> +
> +AUTHOR
>  ------
>  Written by Ryan Anderson <ryan@michonline.com>
>  
> @@ -308,7 +340,7 @@ git-send-email is originally based upon
>  send_lots_of_email.pl by Greg Kroah-Hartman.
>  
>  
> -Documentation
> +DOCUMENTATION
>  --------------
>  Documentation by Ryan Anderson
>  
Previous: jari.aalto@cante.netNext: Jari Aalto
Message 2 of 6 in “git-send-email.txt: Add EXAMPLES section. Write 1st level sections in uppercase”
  1. git-send-email.txt: Add EXAMPLES section. Write 1st level sections in uppercasejari.aalto@cante.net, Apr 15, 2010
  2. Michael J GruberApr 16, 2010
  3. Jari AaltoApr 16, 2010
  4. Michael J GruberApr 16, 2010
  5. Jari AaltoApr 16, 2010
  6. Junio C HamanoApr 17, 2010

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.