summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 7854dad)
raw | patch | inline | side by side (parent: 7854dad)
author | Holger Weiss <holger@zedat.fu-berlin.de> | |
Sat, 7 Nov 2009 01:23:32 +0000 (02:23 +0100) | ||
committer | Holger Weiss <holger@zedat.fu-berlin.de> | |
Sat, 7 Nov 2009 01:23:32 +0000 (02:23 +0100) |
Now that we don't ignore empty commits anymore, there's no need to keep
track of the number of commits actually notified about, as that will
always be equal to the number of commits returned by get_new_commits().
track of the number of commits actually notified about, as that will
always be equal to the number of commits returned by get_new_commits().
tools/git-notify | patch | blob | history |
diff --git a/tools/git-notify b/tools/git-notify
index d53461c8af7f8c08ee83f3d9859253520d4784f9..548f7da97cb80920b45c68bcfc03f4944bc0a6eb 100755 (executable)
--- a/tools/git-notify
+++ b/tools/git-notify
# debug mode
my $debug = 0;
-# number of generated (non-CIA) notifications
-my $sent_notices = 0;
-
# configuration parameters
# base URL of the gitweb repository browser (can be set with the -u option)
mail_notification($commitlist_address, "$refname $reftype $action",
"text/plain; charset=us-ascii", @notice);
- $sent_notices++;
}
# send a commit notice to a mailing list
$subject .= ": " . truncate_str(${$info{"log"}}[0],50);
$_ = decode($info{"encoding"}, $_) for @notice;
mail_notification($commitlist_address, $subject, "text/plain; charset=UTF-8", @notice);
- $sent_notices++;
}
# send a commit notice to the CIA server
}
mail_notification($commitlist_address, "New commits on branch $ref", "text/plain; charset=UTF-8", @$notice);
- $sent_notices++;
}
# send all the notices
{
send_global_notice( $refname, $old_sha1, $new_sha1 ) if $commitlist_address;
}
- else
+ elsif (@$commits > 0)
{
foreach my $commit (@$commits)
{
send_cia_notice( $refname, $commit ) if $cia_project_name;
}
}
- if ($sent_notices == 0 and $commitlist_address)
+ elsif ($commitlist_address)
{
@notice = ( "Old SHA1: $old_sha1", "New SHA1: $new_sha1" );
send_ref_notice( $ref, "modified", @notice );