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>
Shawn O. Pearce committed
May 25, 2008 at 22:18 UTC
50b7b2ee99cb98265f847d91159cb3215c6f2379
1 file changed
+1
contrib/hooks/update-paranoid
+1
@@ -136,6 +136,7 @@ sub parse_config ($$$$) {
136
local $ENV{GIT_DIR} = shift;
137
my $br = shift;
138
my $fn = shift;
139
+ return unless git_value('rev-list','--max-count=1',$br,'--',$fn);
140
info "Loading $br:$fn";
141
open(I,'-|','git','cat-file','blob',"$br:$fn");
142
my $section = '';