git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: [PATCH 3/3] Adds a #!bash to the top of bash completions so that editors can recognize, it as a bash script. Also adds a few simple comments above commands that, take arguments. The comments are meant to remind editors of potential, problems that
@ 2009-01-16 15:06 Baz
  2009-01-17  1:40 ` Jeff King
  0 siblings, 1 reply; 40+ messages in thread
From: Baz @ 2009-01-16 15:06 UTC (permalink / raw)
  To: markus.heidelberg
  Cc: Adeodato Simó, Boyd Stephen Smith Jr., Shawn O. Pearce,
	Ted Pavlic, git, Junio C Hamano

2009/1/15 Markus Heidelberg <markus.heidelberg@web.de>:
> Adeodato Simó, 13.01.2009:
>> * Boyd Stephen Smith Jr. [Tue, 13 Jan 2009 14:03:11 -0600]:
>>
>> > On Tuesday 2009 January 13 10:45:18 Shawn O. Pearce wrote:
>> > >See [...] how the subject is a niceshort, one
>> > >line summary of the module impacted and the change?
>>
>> > My rule for this is absolutely no more than 80 characters.
>>
>> My rule for *all* of the commit message is "absolutely no more than 76
>> characters". With more than 76, `git log` wraps in a 80-column terminal.
>
> What about the 50 character limit proposed in the documentation
> (git-commit, gittutorial, user-manual)?
>
> At the beginning I tried to fulfil this limit, but often it's not easy.
> So should it be adjusted to a slightly higher value in the documentation
> or even split into a recommended limit (e.g. 50) and a recommended
> absolute maximum (e.g. 76)? Hmm, the split wouldn't make sense, I think.

The 50 character limit is for the first line, try "git log
--pretty=oneline" and it should be obvious why.
The rest of the lines can be longer, 72 is another popular choice.

I'm wondering if the default commit-msg hook should have something like:
perl -ne '$lim = (50,0,72)[($.>3?3:$.)-1];
            chomp;
            if (length($_) > $lim) {
              print STDERR "Line $. of commit message exceeded $lim
characters";
              exit 1;
            }' $1

to more forcefully suggest what's in the manual, like the pre-commit hook does.

(I wish I'd had something like this when one of the devs here pushed a
commit with a 346-line message,
just listing what files he was changing...doh)

-Baz

>
> Markus
>
> --
> To unsubscribe from this list: send the line "unsubscribe git" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>

^ permalink raw reply	[flat|nested] 40+ messages in thread

end of thread, other threads:[~2009-01-25 14:17 UTC | newest]

Thread overview: 40+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-01-16 15:06 [PATCH 3/3] Adds a #!bash to the top of bash completions so that editors can recognize, it as a bash script. Also adds a few simple comments above commands that, take arguments. The comments are meant to remind editors of potential, problems that Baz
2009-01-17  1:40 ` Jeff King
2009-01-17 12:37   ` Markus Heidelberg
2009-01-17 15:21     ` Jeff King
2009-01-17 15:32       ` [PATCH 1/2] color: make it easier for non-config to parse color specs Jeff King
2009-01-18 17:10         ` René Scharfe
2009-01-18 17:28           ` Jeff King
2009-01-18 17:36             ` Jeff King
2009-01-18 17:45             ` René Scharfe
2009-01-18 18:06               ` Jeff King
2009-01-17 15:38       ` [PATCH 2/2] expand --pretty=format color options Jeff King
2009-01-18 17:13         ` René Scharfe
2009-01-18 17:37           ` Jeff King
2009-01-18 19:43             ` Jeff King
2009-01-18 19:53               ` Jeff King
2009-01-18 20:37                 ` [PATCH 1/2] handle color.ui at a central place Markus Heidelberg
2009-01-18 20:39                   ` [PATCH 2/2] move the color variables to color.c Markus Heidelberg
2009-01-20  4:04                   ` [PATCH 1/2] handle color.ui at a central place Jeff King
2009-01-21 22:35                     ` Markus Heidelberg
2009-01-22  0:00                       ` Jeff King
2009-01-22  0:13                         ` Markus Heidelberg
2009-01-23  6:13                           ` Junio C Hamano
2009-01-24 11:28                             ` Markus Heidelberg
2009-01-24 14:14                               ` Johannes Schindelin
2009-01-24 14:23                                 ` Markus Heidelberg
2009-01-24 18:36                               ` Junio C Hamano
2009-01-24 19:17                                 ` Jeff King
2009-01-24 20:26                                   ` Junio C Hamano
2009-01-24 20:45                                     ` Jeff King
2009-01-25 14:15                                 ` Markus Heidelberg
2009-01-19 23:10                 ` [PATCH 2/2] expand --pretty=format color options Junio C Hamano
2009-01-20  4:06                   ` Jeff King
2009-01-20 10:27                     ` Johannes Schindelin
2009-01-20 10:36                       ` Johannes Schindelin
2009-01-20 14:23                         ` Jeff King
2009-01-20 14:58                           ` Johannes Schindelin
2009-01-20 19:21                             ` Jeff King
2009-01-17 15:39       ` Cyellow, was Re: [a way-too-long line] Johannes Schindelin
2009-01-17 15:40         ` Jeff King
2009-01-17 15:46           ` Johannes Schindelin

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).