From c9d315a8f6fafbeadc9ff437c128146c24e7c82a Mon Sep 17 00:00:00 2001 From: "Kyle J. McKay" Date: Wed, 21 Aug 2013 23:00:48 -0700 Subject: [PATCH] Notify.pm: avoid rev-list hash..0000 on ref deletions When a ref change happens that deletes a ref, do not attempt to list the revisions in the range from the old hash value through hash value 0000000000000000000000000000000000000000 since that will generate an error and not produce any commits anyway. Instead simply return an empty list in this case. There is already a special case for the reverse that handles the initial push of a new ref so the range from the empty hash value 0000000000000000000000000000000000000000 to the new ref is never passed to git rev-list. --- Girocco/Notify.pm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Girocco/Notify.pm b/Girocco/Notify.pm index cb0bcb3..c80cf17 100644 --- a/Girocco/Notify.pm +++ b/Girocco/Notify.pm @@ -182,6 +182,8 @@ sub cia { sub get_commits { my ($proj, $ref, $oldrev, $newrev) = @_; + return () if $newrev =~ /^0+$/; + my @gcmd = ($Girocco::Config::git_bin, '--git-dir='.$proj->{path}); my $fd; -- 2.11.4.GIT