Commit graph

11 commits

Author SHA1 Message Date
Holger Weiss
a6b3296897 git-nofity: Try to shorten Gitweb URLs
Instead of using the full SHA1 values of commit object names within
Gitweb URLs, try to abbreviate them to a shorter unique name.
2009-10-24 22:55:44 +02:00
Holger Weiss
aa5dfec917 git-notify: Move the Gitweb URL to the bottom
In commit notifications, specify the Gitweb URL (if any) at the bottom
of the ASCII "table" which summarizes the commit.  That looks better.
2009-10-24 22:55:43 +02:00
Holger Weiss
15920fb433 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 ]
2009-10-24 22:53:55 +02:00
Holger Weiss
a5fa304ce3 git-notify: Send notifications on ref changes, too
Do not only generate notifications on commits, but also if a branch head
or lightweight tag was created, removed, or modified.  Notifications on
branch head updates are omitted if one or more commit notification have
been generated and the branch head now references a descendant of the
originally referenced commit (which should be the usual case).
2009-10-24 11:44:33 +02:00
Holger Weiss
709d238041 git-notify: Call git-rev-list(1) via a subroutine
Add a subroutine which abstracts away executing git-rev-list(1) and
checking the result in order to avoid code duplication.
2009-10-24 11:44:29 +02:00
Holger Weiss
e31d34fc90 git-notify: Mention the committer where applicable
If the committer is not the author of the commit, mention the committer
in addition to the author.
2009-10-24 11:44:25 +02:00
Holger Weiss
56c46014d0 git-notify: New subroutine for column alignment
Most notifications include an ASCII "table" with two columns.  The
formatting of these columns is now handled by the new format_table()
subroutine, so that the alignment can easily be changed in the future.
2009-10-24 11:44:21 +02:00
Holger Weiss
db63fbfa03 git-notify: Ignore "empty" commits
Omit notifications regarding commits which don't change the tree
whatsoever.
2009-10-24 11:44:16 +02:00
Holger Weiss
5445b9769f git-notify: Remove unused tag notification code
The code which handles notifications regarding tags was unused, as only
objects listed by git-rev-list(1) are considered, and git-rev-list(1)
never spits out the sha1 of a tag object.
2009-10-24 11:44:10 +02:00
Holger Weiss
51771dc540 git-notify: Save author without trailing space
Adjust the regular expression which catches the commit author name so
that it doesn't include the space character which follows that name.
2009-10-24 11:44:00 +02:00
Holger Weiss
7f1844835d Import git-update-mirror and git-notify
Import the (self-written) git-update-mirror script, which updates clones
of Git repositories and then calls git-notify (in just the same way as a
post-receive hook would be called by Git).  The git-notify script is
imported from git://source.winehq.org/git/tools.git (commit: 03d66f34)
and generates notifications on repository changes.  We'll use these
scripts for generating our commit e-mails.
2009-10-24 11:42:52 +02:00