aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgitolite tester <tester@example.com>2016-05-06 10:05:21 +0530
committerSitaram Chamarty <sitaram@atc.tcs.com>2016-05-07 10:14:55 +0530
commit34da7085f119d177ac4afcb5e47b9f3d8c043a7f (patch)
tree55cc198d8a6819c48e5268a910d92ac7db132f17
parentgitolite setup: use '-m' to supply a custom commit message (diff)
downloadgitolite-gentoo-34da7085f119d177ac4afcb5e47b9f3d8c043a7f.tar.gz
gitolite-gentoo-34da7085f119d177ac4afcb5e47b9f3d8c043a7f.tar.bz2
gitolite-gentoo-34da7085f119d177ac4afcb5e47b9f3d8c043a7f.zip
don't run postupdate unless master has been pushed
thanks to Joseph Huttner for the idea
-rw-r--r--src/lib/Gitolite/Hooks/PostUpdate.pm1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/lib/Gitolite/Hooks/PostUpdate.pm b/src/lib/Gitolite/Hooks/PostUpdate.pm
index 2eeefcc..a76d1d9 100644
--- a/src/lib/Gitolite/Hooks/PostUpdate.pm
+++ b/src/lib/Gitolite/Hooks/PostUpdate.pm
@@ -20,6 +20,7 @@ use warnings;
sub post_update {
trace( 3, 'post-up', @ARGV );
+ exit 0 unless grep( m(^refs/heads/master$), @ARGV );
# this is the *real* post_update hook for gitolite
tsh_try("git ls-tree --name-only master");