[Nagiosplug-checkins] SF.net SVN: nagiosplug:[2262] nagiosplug/trunk/tools/git-notify
dermoth at users.sourceforge.net
dermoth at users.sourceforge.net
Sat Oct 24 22:59:47 CEST 2009
Revision: 2262
http://nagiosplug.svn.sourceforge.net/nagiosplug/?rev=2262&view=rev
Author: dermoth
Date: 2009-10-24 20:59:46 +0000 (Sat, 24 Oct 2009)
Log Message:
-----------
git-notify: Ignore "empty" commits
Omit notifications regarding commits which don't change the tree
whatsoever.
From: Holger Weiss <holger at zedat.fu-berlin.de>
Modified Paths:
--------------
nagiosplug/trunk/tools/git-notify
Modified: nagiosplug/trunk/tools/git-notify
===================================================================
--- nagiosplug/trunk/tools/git-notify 2009-10-24 20:59:31 UTC (rev 2261)
+++ nagiosplug/trunk/tools/git-notify 2009-10-24 20:59:46 UTC (rev 2262)
@@ -230,6 +230,12 @@
my %info = get_object_info($obj);
my @notice = ();
+ open DIFF, "-|" or exec "git", "diff-tree", "-p", "-M", "--no-commit-id", $obj or die "cannot exec git-diff-tree";
+ my $diff = join("", <DIFF>);
+ close DIFF;
+
+ return if length($diff) == 0;
+
push @notice,
"Module: $repos_name",
"Branch: $ref",
@@ -247,10 +253,6 @@
push @notice, join("", <STAT>);
close STAT;
- open DIFF, "-|" or exec "git", "diff-tree", "-p", "-M", "--no-commit-id", $obj or die "cannot exec git-diff-tree";
- my $diff = join( "", <DIFF> );
- close DIFF;
-
if (($max_diff_size == -1) || (length($diff) < $max_diff_size))
{
push @notice, $diff;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Commits
mailing list