From: Fredrik Gustafsson <iveqy@iveqy.com>
To: git@vger.kernel.org
Cc: gitster@pobox.com, iveqy@iveqy.com
Subject: [PATCH] Clarify documentation on commit message strip
Date: Sat, 25 Apr 2015 07:42:45 +0200 [thread overview]
Message-ID: <1429940565-14947-1-git-send-email-iveqy@iveqy.com> (raw)
In-Reply-To: <xmqqmw1w259r.fsf@gitster.dls.corp.google.com>
When using `-v` to add a unified diff to the commit message, this is
stripped and not a part of the commit message. This is not mentioned.
Add a note about this with the `-v` description and slightly modify
the description for the default `--cleanup` mode.
Signed-off-by: Fredrik Gustafsson <iveqy@iveqy.com>
---
>I'd prefer the description not to be _too_ explicit e.g. by
>mentioning "unified diff", etc.
>
>Personally I think it is sufficient to do s/#comment/comment/ to the
>existing text, without doing anything else. What is "commentary" to
>be removed is fairly clear in the contents given to the user in the
>editor.
I agree that it is very clear once you do edit the commit message. My main
point with this patch was to clarify -v, since it's not obvious from the
documentation that it will be removed.
I've no objections about your suggestions about the `strip` part. I hope I've
understood you correctly and that this patch is correct.
Documentation/git-commit.txt | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/Documentation/git-commit.txt b/Documentation/git-commit.txt
index 617e29b..1db4c7f 100644
--- a/Documentation/git-commit.txt
+++ b/Documentation/git-commit.txt
@@ -180,8 +180,8 @@ OPTIONS
+
--
strip::
- Strip leading and trailing empty lines, trailing whitespace, and
- #commentary and collapse consecutive empty lines.
+ Strip leading and trailing empty lines, trailing whitespace,
+ commentary and collapse consecutive empty lines.
whitespace::
Same as `strip` except #commentary is not removed.
verbatim::
@@ -283,7 +283,8 @@ configuration variable documented in linkgit:git-config[1].
Show unified diff between the HEAD commit and what
would be committed at the bottom of the commit message
template. Note that this diff output doesn't have its
- lines prefixed with '#'.
+ lines prefixed with '#'. This diff will not be a part
+ of the commit message.
+
If specified twice, show in addition the unified diff between
what would be committed and the worktree files, i.e. the unstaged
--
2.1.4
next prev parent reply other threads:[~2015-04-25 5:52 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-24 20:06 [PATCH] Clarify documentation on commit message strip Fredrik Gustafsson
2015-04-25 4:36 ` Junio C Hamano
2015-04-25 5:42 ` Fredrik Gustafsson [this message]
2015-04-27 17:31 ` Junio C Hamano
2015-04-27 18:13 ` Fredrik Gustafsson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1429940565-14947-1-git-send-email-iveqy@iveqy.com \
--to=iveqy@iveqy.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).