From: "Sean" <seanlkml@sympatico.ca>
To: "Linus Torvalds" <torvalds@osdl.org>
Cc: "Jaroslav Kysela" <perex@suse.cz>,
"LKML" <linux-kernel@vger.kernel.org>,
"Andrew Morton" <akpm@osdl.org>,
"Git Mailing List" <git@vger.kernel.org>
Subject: Re: ALSA official git repository
Date: Fri, 27 May 2005 13:00:07 -0400 (EDT) [thread overview]
Message-ID: <3516.10.10.10.24.1117213207.squirrel@linux1> (raw)
In-Reply-To: <Pine.LNX.4.58.0505270903230.17402@ppc970.osdl.org>
[-- Attachment #1: Type: text/plain, Size: 822 bytes --]
On Fri, May 27, 2005 12:13 pm, Linus Torvalds said:
> On Fri, 27 May 2005, Jaroslav Kysela wrote:
>>
>> I created new git tree for the ALSA project at:
>>
>> rsync://rsync.kernel.org/pub/scm/linux/kernel/git/perex/alsa.git
>
> Your scripts(?) to generate these things are a bit strange, since they
> leave an extra empty line in the commit message, which confuses at least
> gitweb (ie just look at
>
> http://www.kernel.org/git/?p=linux/kernel/git/perex/alsa.git;a=summary
>
> and note how the summary thing looks empty).
>
> Now, arguably gitweb should ignore whitespace at the beginning, but
> equally arguably your commits shouldn't have them either...
>
Perhaps git should enforce this? Patch attached.
Remove leading empty lines from commit messages.
Signed-off-by: Sean Estabrooks <seanlkml@sympatico.ca>
[-- Attachment #2: trim_leading_commit_ws.patch --]
[-- Type: text/plain, Size: 1133 bytes --]
--- raw/commit-tree.c 2005-05-26 23:38:30.000000000 -0400
+++ argp2/commit-tree.c 2005-05-27 12:46:54.000000000 -0400
@@ -90,6 +90,18 @@
free(buf);
}
+static int whitespace(const char *msg)
+{
+ while (*msg)
+ switch (*msg) {
+ case ' ': case '\t': case '\n': case '\r':
+ msg++; break;
+ default:
+ return 0;
+ }
+ return 1;
+}
+
/*
* Having more than two parents is not strange at all, and this is
* how multi-way merges are represented.
@@ -112,7 +124,7 @@
char comment[1000];
struct passwd *pw;
char *buffer;
- unsigned int size;
+ unsigned int size, csize;
if (argc < 2 || get_sha1_hex(argv[1], tree_sha1) < 0)
usage(commit_tree_usage);
@@ -174,8 +186,10 @@
add_buffer(&buffer, &size, "committer %s <%s> %s\n\n", commitgecos, commitemail, realdate);
/* And add the comment */
+ csize = size;
while (fgets(comment, sizeof(comment), stdin) != NULL)
- add_buffer(&buffer, &size, "%s", comment);
+ if (size > csize || ! whitespace(comment))
+ add_buffer(&buffer, &size, "%s", comment);
write_sha1_file(buffer, size, "commit", commit_sha1);
printf("%s\n", sha1_to_hex(commit_sha1));
next prev parent reply other threads:[~2005-05-27 17:00 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-05-27 15:51 ALSA official git repository Jaroslav Kysela
2005-05-27 16:13 ` Linus Torvalds
2005-05-27 17:00 ` Sean [this message]
2005-05-27 17:28 ` Linus Torvalds
2005-05-27 18:47 ` Junio C Hamano
2005-05-27 17:43 ` Jaroslav Kysela
2005-05-27 18:16 ` Linus Torvalds
2005-05-27 20:51 ` Andrew Morton
2005-05-27 20:57 ` Junio C Hamano
2005-05-27 21:18 ` Jesper Juhl
2005-05-27 21:19 ` Schneelocke
2005-05-27 22:06 ` Linus Torvalds
2005-05-27 22:46 ` Andrew Morton
2005-05-28 2:21 ` Linus Torvalds
2005-05-28 3:33 ` Chris Wedgwood
2005-05-29 9:06 ` Jaroslav Kysela
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=3516.10.10.10.24.1117213207.squirrel@linux1 \
--to=seanlkml@sympatico.ca \
--cc=akpm@osdl.org \
--cc=git@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=perex@suse.cz \
--cc=torvalds@osdl.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.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.