public inbox for git@vger.kernel.org 
 help / color / mirror / Atom feed
From: Junio C Hamano <junkio@cox•net>
To: "Michael S. Tsirkin" <mst@dev•mellanox.co.il>
Cc: Git Mailing List <git@vger•kernel.org>
Subject: Re: [PATCH] have merge put FETCH_HEAD data in commit message
Date: Thu, 22 Mar 2007 03:31:31 -0700	[thread overview]
Message-ID: <7vr6rhtvr0.fsf@assigned-by-dhcp.cox.net> (raw)
In-Reply-To: <20070322083757.GC29341@mellanox.co.il> (Michael S. Tsirkin's message of "Thu, 22 Mar 2007 10:37:57 +0200")

"Michael S. Tsirkin" <mst@dev•mellanox.co.il> writes:

> Specifically, as far as a *user* is concerned:
> 1. the fact that "---" separates commit message from patch, and
>    that text after "---" is ignored seems to be undocumented
> 2. the fact that message subject is appended to the log,
>    the rules for removing [PATCH] etc from subject seem to be undocumented
> 3. if I want to have some text coming *before* the commit
>    message ignored, there's no way to do this
> 4. there's no way to override the subject from within the message
>    (like there is with author/From line)

How about this?  Also check t5100 and its sample mailbox,
especially the "third patch" from A U Thor, which I forwarded
with the subject "another patch".

---

 Documentation/git-am.txt |   27 +++++++++++++++++++++++++++
 1 files changed, 27 insertions(+), 0 deletions(-)

diff --git a/Documentation/git-am.txt b/Documentation/git-am.txt
index 13a7389..148ce40 100644
--- a/Documentation/git-am.txt
+++ b/Documentation/git-am.txt
@@ -87,6 +87,33 @@ default.   You could use `--no-utf8` to override this.
 DISCUSSION
 ----------
 
+The commit author name is taken from the "From: " line of the
+message, and commit author time is taken from the "Date: " line
+of the message.  The "Subject: " line is used as the title of
+the commit, after stripping common prefix "[PATCH <anything>]".
+It is supposed to describe what the commit is about concisely as
+a one line text.
+
+The body of the message (iow, after a blank line that terminates
+RFC2822 headers) can begin with "Subject: " and "From: " lines
+that are different from those of the mail header, to override
+the values of these fields.
+
+The commit message is formed by the title taken from the
+"Subject: ", a blank line and the body of the message up to
+where the patch begins.  Excess whitespaces at the end of the
+lines are automatically stripped.
+
+The patch is expected to be inline, directly following the
+message.  Any line that is of form:
+
+* three-dashes and end-of-line, or
+* a line that begins with "diff -", or
+* a line that begins with "Index: "
+
+is taken as the beginning of a patch, and the commit log message
+is terminated before the first occurrence of such a line.
+
 When initially invoking it, you give it names of the mailboxes
 to crunch.  Upon seeing the first patch that does not apply, it
 aborts in the middle, just like 'git-applymbox' does.  You can

  reply	other threads:[~2007-03-22 10:31 UTC|newest]

Thread overview: 70+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-03-21 12:06 [PATCH] have merge put FETCH_HEAD data in commit message Michael S. Tsirkin
2007-03-21 15:37 ` Junio C Hamano
2007-03-22  5:02   ` Michael S. Tsirkin
2007-03-22  5:09     ` Junio C Hamano
2007-03-22  6:28       ` Michael S. Tsirkin
2007-03-22  7:15         ` Junio C Hamano
2007-03-22  7:41           ` Michael S. Tsirkin
2007-03-22  8:21             ` Junio C Hamano
2007-03-22  8:37               ` Michael S. Tsirkin
2007-03-22 10:31                 ` Junio C Hamano [this message]
2007-03-22 10:40                   ` Michael S. Tsirkin
2007-03-24 10:21                     ` Junio C Hamano
2007-04-04  6:02                       ` Michael S. Tsirkin
2007-04-04  6:09                         ` Junio C Hamano
2007-04-04  6:18                           ` Michael S. Tsirkin
2007-04-04  6:19                           ` Shawn O. Pearce
2007-04-04  6:25                             ` Junio C Hamano
2007-04-04  6:35                               ` Shawn O. Pearce
2007-04-04  6:24                         ` Junio C Hamano
2007-04-04  7:01                           ` [PATCH] display shortlog after git-commit Michael S. Tsirkin
2007-04-04  7:22                             ` Junio C Hamano
2007-04-15 22:39                               ` Michael S. Tsirkin
2007-04-15 23:08                                 ` Junio C Hamano
2007-04-16  3:53                                   ` [PATCH] display the subject of the commit just made Michael S. Tsirkin
2007-04-16  5:16                                     ` Junio C Hamano
2007-04-16  5:40                                       ` Michael S. Tsirkin
2007-04-16  6:17                                         ` Junio C Hamano
2007-04-16  5:51                                       ` Michael S. Tsirkin
2007-04-16  6:01                                         ` Junio C Hamano
2007-04-16  6:18                                           ` Michael S. Tsirkin
2007-04-16  6:51                                             ` Michael S. Tsirkin
2007-04-16  7:00                                               ` Junio C Hamano
2007-04-16  7:11                                                 ` Shawn O. Pearce
2007-04-16  7:59                                                   ` Michael S. Tsirkin
2007-04-16 12:56                                                   ` Alex Riesen
2007-04-16 17:46                                                     ` Junio C Hamano
2007-04-16  5:34                                   ` [PATCH] display shortlog after git-commit Michael S. Tsirkin
2007-04-16  6:04                                     ` Junio C Hamano
2007-04-16  6:26                                       ` Michael S. Tsirkin
2007-04-16 14:40                                       ` [PATCH] remove shortlog from git-commit output Michael S. Tsirkin
2007-04-16 15:02                                         ` Julian Phillips
2007-04-16 18:23                                           ` Michael S. Tsirkin
2007-04-16 20:21                                             ` Julian Phillips
2007-04-17  6:02                                               ` Michael S. Tsirkin
2007-04-17  7:27                                                 ` Julian Phillips
2007-04-04  8:15                             ` [PATCH] display shortlog after git-commit Junio C Hamano
2007-04-15 10:33                               ` Michael S. Tsirkin
2007-04-15 19:57                                 ` Junio C Hamano
2007-04-15 20:09                                   ` Michael S. Tsirkin
2007-04-15 20:26                                     ` Andy Parkins
2007-04-15 20:34                                       ` Michael S. Tsirkin
2007-04-04  6:24                         ` [PATCH] wt-status: show author info if status.showauthor is set Jeff King
2007-04-04  6:32                           ` Junio C Hamano
2007-04-04  6:49                           ` Michael S. Tsirkin
2007-04-04  6:52                             ` Junio C Hamano
2007-04-04  6:55                             ` Shawn O. Pearce
2007-04-04 13:28                           ` Jakub Narebski
2007-03-23 13:57                   ` [PATCH] have merge put FETCH_HEAD data in commit message Jakub Narebski
2007-03-23 13:59                     ` J. Bruce Fields
2007-03-23 14:23                       ` Jakub Narebski
2007-03-23 15:33                         ` J. Bruce Fields
2007-03-24  0:03                           ` Jakub Narebski
2007-03-22  9:07               ` [PATCH] Put FETCH_HEAD data in merge " Michael S. Tsirkin
2007-03-22 10:01                 ` Junio C Hamano
2007-03-22  8:33   ` [PATCH] have merge put FETCH_HEAD data in " Jeff King
2007-03-22  8:51     ` Junio C Hamano
2007-03-22  9:09       ` Jeff King
2007-03-22  9:10   ` Andy Parkins
2007-03-21 17:29 ` [PATCHv2] put FETCH_HEAD data in merge " Michael S. Tsirkin
2007-03-21 18:09   ` Junio C Hamano

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=7vr6rhtvr0.fsf@assigned-by-dhcp.cox.net \
    --to=junkio@cox$(echo .)net \
    --cc=git@vger$(echo .)kernel.org \
    --cc=mst@dev$(echo .)mellanox.co.il \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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