Re: [PATCH 0/3] "commit --template" fixes

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Adam Monsen <haircut@xxxxxxxxx> writes:

> ...
> * I don't know the kosher procedure to add this commit to your patch
>   series for further review, so hopefully this works.
> * I'm not sure if the "Helped-by:" lines are kosher, I'm happy to
>   remove them if not.

One established way to do this is to have a discussion like the above
(mostly elided), followed by a "scissors" line "-- >8 --", and then the
output from format-patch with most headers except for "Subject: " removed
(as From: and Date: will be taken from your e-mailed message anyway, and
the first "From <commit object name> <magic constant date>" is a signal to
allow automated tools to tell if it is a format-patch output or a random
mbox file, and is not appropriate if you are sending it over e-mail).

>
> From 91a62baa1fe89032e7a3598e5d39241f3eb8f84b Mon Sep 17 00:00:00 2001
> From: Adam Monsen <haircut@xxxxxxxxx>
> Date: Sat, 31 Mar 2012 12:09:29 -0700
> Subject: [PATCH] git-commit.txt: clarify -t requires editing message
>
> Make it clear that, when using commit --template, the message *must* be
> changed or the commit will be aborted.
>
>
> Helped-by: Junio C Hamano <gitster@xxxxxxxxx>
> Helped-by: Ivan Heffner <iheffner@xxxxxxxxx>
> Signed-off-by: Adam Monsen <haircut@xxxxxxxxx>
> ---
> I wrapped the text at 77 characters because that was the longest
> line in the file (according to wc -L).
>
> I used ":set noet nosta ts=8 sw=8 tw=77" in Vim.

When rewording or clarifying only a handful of words in the documentation,
it is often better to avoid reflowing lines in the same patch.  It makes
it harder to see what you really changed, and what is merely reflowed.

I'll queue it as-is, though.  Thanks.

This is a tangent, but we might want to rephrase the first sentence
without using the word "version"; every time I read this paragraph, the
"initial version" makes me go "Huh?" because the word sounds as if it is
talking about commits in the context of SCM, which is not the case here.

I know that the description wanted to avoid use of the word "template" to
explain what the template is, but still...

>  Documentation/git-commit.txt |   10 +++++-----
>  1 files changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/Documentation/git-commit.txt b/Documentation/git-commit.txt
> index 5cc84a1..f584a62 100644
> --- a/Documentation/git-commit.txt
> +++ b/Documentation/git-commit.txt
> @@ -132,11 +132,11 @@ OPTIONS
>  
>  -t <file>::
>  --template=<file>::
> -	Use the contents of the given file as the initial version
> -	of the commit message. The editor is invoked and you can
> -	make subsequent changes. If a message is specified using
> -	the `-m` or `-F` options, this option has no effect. This
> -	overrides the `commit.template` configuration variable.
> +	Use the contents of the given file as the initial version of the
> +	commit message. The editor is invoked so you can make subsequent
> +	changes. If you make no changes, the commit is aborted. If a message
> +	is specified using the `-m` or `-F` options, this option has no
> +	effect. This overrides the `commit.template` configuration variable.
>  
>  -s::
>  --signoff::
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]