Code

git-notify: Fix "global" notifications
[nagiosplug.git] / tools / git-notify
index 8ade7b8a31baf067f53073184944259434cf5ec9..e64754c3e1defd78657a40685d7a68b328b2a9b3 100755 (executable)
@@ -145,7 +145,10 @@ sub git_rev_list(@)
     while (<REVLIST>)
     {
         chomp;
-        die "Invalid commit: $_" if not /^[0-9a-f]{40}$/;
+        unless (grep {$_ eq "--pretty"} @args)
+        {
+            die "Invalid commit: $_" if not /^[0-9a-f]{40}$/;
+        }
         push @$revlist, $_;
     }
     close REVLIST or die $! ? "Cannot execute rev-list: $!" : "rev-list exited with status: $?";