[nagiosplug] Revert "git-notify: Ignore `empty' commits"

"Holger Weiss" <[email protected]>
Newsgroups gmane.network.nagios.plugins.cvs
Message-ID <[email protected]>
 Module: nagiosplug
 Branch: master
 Commit: 7854dad6e08c58334bbff1a5c0e0da2f847c9ef1
 Author: Holger Weiss <[email protected]>
   Date: Sat Nov  7 02:23:32 2009 +0100
    URL: http://nagiosplug.git.sf.net/git/gitweb.cgi?p=nagiosplug/nagiosplug;a=commit;h=7854dad

Revert "git-notify: Ignore `empty' commits"

This reverts commit db63fbfa036f5cd757aedf4547fef9e195a8c285, as it is
no longer needed and we'd like to keep the diff against the git-notify
version maintained by the Wine people as small as possible.  The purpose
of db63fbfa was to suppress notifications on empty merge commits, which
can now be requested directly by specifying git-notify's "-X" option.
(Our change was implemented before the "-X" option was available, even
though the Git history suggests otherwise.)

Conflicts:

	tools/git-notify

---

 tools/git-notify |   10 ++++------
 1 files changed, 4 insertions(+), 6 deletions(-)

diff --git a/tools/git-notify b/tools/git-notify
index f524fd7..d53461c 100755
--- a/tools/git-notify
+++ b/tools/git-notify
@@ -404,12 +404,6 @@ sub send_commit_notice($$)
     my @notice = ();
     my ($url,$subject);
 
-    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 or die $! ? "Cannot execute diff-tree: $!" : "diff-tree exited with status: $?";
-
-    return if length($diff) == 0;
-
     if ($gitweb_url)
     {
         open REVPARSE, "-|" or exec "git", "rev-parse", "--short", $obj or die "cannot exec git-rev-parse";
@@ -455,6 +449,10 @@ sub send_commit_notice($$)
         push @notice, join("", <STAT>);
         close STAT or die $! ? "Cannot execute diff-tree: $!" : "diff-tree exited with status: $?";
 
+        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 or die $! ? "Cannot execute diff-tree: $!" : "diff-tree exited with status: $?";
+
         if (($max_diff_size == -1) || (length($diff) < $max_diff_size))
         {
             push @notice, $diff;


------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.