From: Linus Torvalds <torvalds@linux-foundation.org>
To: Paul Mundt <lethal@linux-sh.org>
Cc: linux-sh@vger.kernel.org, Git Mailing List <git@vger.kernel.org>,
Junio C Hamano <gitster@pobox.com>
Subject: Re: [GIT PULL] sh updates for 2.6.25
Date: Tue, 15 Apr 2008 11:01:36 -0700 (PDT) [thread overview]
Message-ID: <alpine.LFD.1.00.0804151048060.2879@woody.linux-foundation.org> (raw)
In-Reply-To: <20080415172333.GA29489@linux-sh.org>
On Wed, 16 Apr 2008, Paul Mundt wrote:
>
> Please pull from:
>
> git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6.25.git
Paul, your git tree is odd. Not quite corrupt, but it doesn't really
follow the rules either.
In particular, it has empty lines at the top of those commits, and I
wonder how you created them.
Doing things like "git log" will ignore the spurious empty lines, but they
can be seen with things like "git cat-file", eg
git cat-file commit fd785d6b18b930b76ad5076eed6e9af43195b281
and I wonder if you used a buggy version of git, or whether you perhaps
have some scripts that import these commits from the outside and uses some
low-level commands that can generate these kinds of subtly bogus commits.
The reason I noticed is that it screws up the git merge summary, which
will take the first line of each commit it merges (_without_ the "skip
empty lines" logic) to generate the summary of the merge.
I think we should fix that git merge summary code to allow for this bad
behaviour, but I also want to know why such corrupt commits exist in the
first place. What toolchain do you use to create that commit? We should
fix that too!
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)
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 parent reply other threads:[~2008-04-15 18:03 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 ` Linus Torvalds [this message]
2008-04-15 18:18 ` [GIT PULL] sh updates for 2.6.25 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
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=alpine.LFD.1.00.0804151048060.2879@woody.linux-foundation.org \
--to=torvalds@linux-foundation.org \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=lethal@linux-sh.org \
--cc=linux-sh@vger.kernel.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).