diff options
author | Holger Weiss <holger@zedat.fu-berlin.de> | 2009-11-07 02:23:32 +0100 |
---|---|---|
committer | Holger Weiss <holger@zedat.fu-berlin.de> | 2009-11-07 02:23:32 +0100 |
commit | 7854dad6e08c58334bbff1a5c0e0da2f847c9ef1 (patch) | |
tree | 1001bf8a2f4baf9d24d2b2635a8eded6ba85775e /tools/git-notify | |
parent | 765c08d15b819c8b9d41caeaa8fa23b4729efd44 (diff) | |
download | monitoring-plugins-7854dad6e08c58334bbff1a5c0e0da2f847c9ef1.tar.gz |
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
Diffstat (limited to 'tools/git-notify')
-rwxr-xr-x | tools/git-notify | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/tools/git-notify b/tools/git-notify index f524fd73..d53461c8 100755 --- a/tools/git-notify +++ b/tools/git-notify | |||
@@ -404,12 +404,6 @@ sub send_commit_notice($$) | |||
404 | my @notice = (); | 404 | my @notice = (); |
405 | my ($url,$subject); | 405 | my ($url,$subject); |
406 | 406 | ||
407 | open DIFF, "-|" or exec "git", "diff-tree", "-p", "-M", "--no-commit-id", $obj or die "cannot exec git-diff-tree"; | ||
408 | my $diff = join("", <DIFF>); | ||
409 | close DIFF or die $! ? "Cannot execute diff-tree: $!" : "diff-tree exited with status: $?"; | ||
410 | |||
411 | return if length($diff) == 0; | ||
412 | |||
413 | if ($gitweb_url) | 407 | if ($gitweb_url) |
414 | { | 408 | { |
415 | open REVPARSE, "-|" or exec "git", "rev-parse", "--short", $obj or die "cannot exec git-rev-parse"; | 409 | open REVPARSE, "-|" or exec "git", "rev-parse", "--short", $obj or die "cannot exec git-rev-parse"; |
@@ -455,6 +449,10 @@ sub send_commit_notice($$) | |||
455 | push @notice, join("", <STAT>); | 449 | push @notice, join("", <STAT>); |
456 | close STAT or die $! ? "Cannot execute diff-tree: $!" : "diff-tree exited with status: $?"; | 450 | close STAT or die $! ? "Cannot execute diff-tree: $!" : "diff-tree exited with status: $?"; |
457 | 451 | ||
452 | open DIFF, "-|" or exec "git", "diff-tree", "-p", "-M", "--no-commit-id", $obj or die "cannot exec git-diff-tree"; | ||
453 | my $diff = join("", <DIFF>); | ||
454 | close DIFF or die $! ? "Cannot execute diff-tree: $!" : "diff-tree exited with status: $?"; | ||
455 | |||
458 | if (($max_diff_size == -1) || (length($diff) < $max_diff_size)) | 456 | if (($max_diff_size == -1) || (length($diff) < $max_diff_size)) |
459 | { | 457 | { |
460 | push @notice, $diff; | 458 | push @notice, $diff; |