From: Junio C Hamano <gitster@pobox.com>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Paul Mundt <lethal@linux-sh.org>,
linux-sh@vger.kernel.org, Git Mailing List <git@vger.kernel.org>
Subject: Re: [GIT PULL] sh updates for 2.6.25
Date: Tue, 15 Apr 2008 11:41:52 -0700 [thread overview]
Message-ID: <7vr6d7x8nj.fsf@gitster.siamese.dyndns.org> (raw)
In-Reply-To: <alpine.LFD.1.00.0804151048060.2879@woody.linux-foundation.org> (Linus Torvalds's message of "Tue, 15 Apr 2008 11:01:36 -0700 (PDT)")
Linus Torvalds <torvalds@linux-foundation.org> writes:
> Junio? Something like this for the merge summary code? (It also turns an
> empty commit message with just whitespace in the commit message into the
> SHA1 hex string)
Yeah, your patch makes sense, but it also makes me wonder if we should fix
the code in pretty.c::parse_commit_header() that grabs the "subject" line,
and use format_commit_message() with "%s" format here. Interested people
then can enhance it to take custom format string.
> Linus
>
> ----
> builtin-fmt-merge-msg.c | 10 +++++++++-
> 1 files changed, 9 insertions(+), 1 deletions(-)
>
> diff --git a/builtin-fmt-merge-msg.c b/builtin-fmt-merge-msg.c
> index ebb3f37..7077d52 100644
> --- a/builtin-fmt-merge-msg.c
> +++ b/builtin-fmt-merge-msg.c
> @@ -201,6 +201,15 @@ static void shortlog(const char *name, unsigned char *sha1,
> continue;
>
> bol = strstr(commit->buffer, "\n\n");
> + if (bol) {
> + unsigned char c;
> + do {
> + c = *++bol;
> + } while (isspace(c));
> + if (!c)
> + bol = NULL;
> + }
> +
> if (!bol) {
> append_to_list(&subjects, xstrdup(sha1_to_hex(
> commit->object.sha1)),
> @@ -208,7 +217,6 @@ static void shortlog(const char *name, unsigned char *sha1,
> continue;
> }
>
> - bol += 2;
> eol = strchr(bol, '\n');
> if (eol) {
> oneline = xmemdupz(bol, eol - bol);
next prev parent reply other threads:[~2008-04-15 18:42 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20080415172333.GA29489@linux-sh.org>
2008-04-15 18:01 ` [GIT PULL] sh updates for 2.6.25 Linus Torvalds
2008-04-15 18:18 ` Linus Torvalds
2008-04-15 18:30 ` Paul Mundt
2008-04-15 19:56 ` Linus Torvalds
2008-04-16 18:54 ` Alex Riesen
2008-04-16 20:02 ` Junio C Hamano
2008-04-16 20:17 ` Linus Torvalds
2008-04-15 18:41 ` Junio C Hamano [this message]
2008-04-15 18:43 ` Jakub Narebski
2008-04-16 0:37 ` Miklos Vajna
2008-04-16 1:06 ` [PATCH] format-patch: Make sure the subject is always a one-liner Miklos Vajna
2008-04-16 3:25 ` [GIT PULL] sh updates for 2.6.25 Junio C Hamano
2008-04-16 8:44 ` Miklos Vajna
2008-04-16 19:58 ` Re* " Junio C Hamano
2008-04-16 20:22 ` Jakub Narebski
2008-04-17 21:38 ` Miklos Vajna
2008-04-27 19:04 ` David Woodhouse
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
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=7vr6d7x8nj.fsf@gitster.siamese.dyndns.org \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=lethal@linux-sh.org \
--cc=linux-sh@vger.kernel.org \
--cc=torvalds@linux-foundation.org \
/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.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
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 read-only IMAP folder(s) and NNTP newsgroup(s).