summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rwxr-xr-xtools/git-notify10
1 files changed, 6 insertions, 4 deletions
diff --git a/tools/git-notify b/tools/git-notify
index 1b10f69..ccde4be 100755
--- a/tools/git-notify
+++ b/tools/git-notify
@@ -230,6 +230,12 @@ sub send_commit_notice($$)
230 my %info = get_object_info($obj); 230 my %info = get_object_info($obj);
231 my @notice = (); 231 my @notice = ();
232 232
233 open DIFF, "-|" or exec "git", "diff-tree", "-p", "-M", "--no-commit-id", $obj or die "cannot exec git-diff-tree";
234 my $diff = join("", <DIFF>);
235 close DIFF;
236
237 return if length($diff) == 0;
238
233 push @notice, 239 push @notice,
234 "Module: $repos_name", 240 "Module: $repos_name",
235 "Branch: $ref", 241 "Branch: $ref",
@@ -247,10 +253,6 @@ sub send_commit_notice($$)
247 push @notice, join("", <STAT>); 253 push @notice, join("", <STAT>);
248 close STAT; 254 close STAT;
249 255
250 open DIFF, "-|" or exec "git", "diff-tree", "-p", "-M", "--no-commit-id", $obj or die "cannot exec git-diff-tree";
251 my $diff = join( "", <DIFF> );
252 close DIFF;
253
254 if (($max_diff_size == -1) || (length($diff) < $max_diff_size)) 256 if (($max_diff_size == -1) || (length($diff) < $max_diff_size))
255 { 257 {
256 push @notice, $diff; 258 push @notice, $diff;