aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShawn O. Pearce <spearce@spearce.org>2008-05-25 22:18:01 -0400
committerJunio C Hamano <gitster@pobox.com>2008-05-25 20:29:30 -0700
commit50b7b2ee99cb98265f847d91159cb3215c6f2379 (patch)
treec6dbaee226347778379ff0fcb0e0421098c9a96d
parent97561fff3263add59ec25207a0c5a635b28ce9b9 (diff)
downloadgit-50b7b2ee99cb98265f847d91159cb3215c6f2379.tar.gz
git-50b7b2ee99cb98265f847d91159cb3215c6f2379.tar.xz
Don't load missing ACL files in paranoid update hook
If a user or group ACL file does not exist in the current tip revision of the acl repository we will get an error from cat-file when we ask for that blob as it cannot be resolved. A quick look at the history by rev-list can tell us if there is a path there or not. Signed-off-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
-rw-r--r--contrib/hooks/update-paranoid1
1 files changed, 1 insertions, 0 deletions
diff --git a/contrib/hooks/update-paranoid b/contrib/hooks/update-paranoid
index 6e0d97c89..ae94822cd 100644
--- a/contrib/hooks/update-paranoid
+++ b/contrib/hooks/update-paranoid
@@ -136,6 +136,7 @@ sub parse_config ($$$$) {
local $ENV{GIT_DIR} = shift;
my $br = shift;
my $fn = shift;
+ return unless git_value('rev-list','--max-count=1',$br,'--',$fn);
info "Loading $br:$fn";
open(I,'-|','git','cat-file','blob',"$br:$fn");
my $section = '';