author | Holger Weiss <holger@zedat.fu-berlin.de> | |
Sat, 24 Oct 2009 20:53:55 +0000 (22:53 +0200) | ||
committer | Holger Weiss <holger@zedat.fu-berlin.de> | |
Sat, 24 Oct 2009 20:53:55 +0000 (22:53 +0200) | ||
commit | 15920fb433b4ee2838ec2ba8997a97b2bbcd6e74 | |
tree | 2d810430be0d7fe90c77a880cd128431ddf269c8 | tree | snapshot |
parent | a5fa304ce3fefdbdeb9f447c08234dd33d8f454a | commit | diff |
git-notify: Truncate summary after 50 characters
If the first line of a commit message is longer than 50 characters,
truncate it before adding the resulting string to the subject line of a
notification. This makes sure the subject line won't get too long
(unless the commit author name is unusually long, which we don't check).
The Git User's Manual recommends keeping the first line of a commit
message shorter than that, anyway:
| Though not required, it's a good idea to begin the commit message with
| a single short (less than 50 character) line summarizing the change,
| followed by a blank line and then a more thorough description. Tools
| that turn commits into email, for example, use the first line on the
| Subject line and the rest of the commit in the body.
[ http://www.kernel.org/pub/software/scm/git/docs/user-manual.html ]
If the first line of a commit message is longer than 50 characters,
truncate it before adding the resulting string to the subject line of a
notification. This makes sure the subject line won't get too long
(unless the commit author name is unusually long, which we don't check).
The Git User's Manual recommends keeping the first line of a commit
message shorter than that, anyway:
| Though not required, it's a good idea to begin the commit message with
| a single short (less than 50 character) line summarizing the change,
| followed by a blank line and then a more thorough description. Tools
| that turn commits into email, for example, use the first line on the
| Subject line and the rest of the commit in the body.
[ http://www.kernel.org/pub/software/scm/git/docs/user-manual.html ]
tools/git-notify | diff | blob | history |