{"thread":{"id":"13662","subject":"[PATCH 2/3] Don't load missing ACL files in paranoid update hook","startedAt":"2008-05-26T02:18:01Z","lastAt":"2008-05-26T02:18:01Z","messageCount":1,"participants":["Shawn O. Pearce"],"isPatch":true,"patchVersion":1,"patchTotal":3},"messages":[{"id":"77733","messageId":"20080526021801.GB29990@spearce.org","threadId":"13662","inReplyTo":null,"subject":"[PATCH 2/3] Don't load missing ACL files in paranoid update hook","fromName":"Shawn O. Pearce","fromEmail":"spearce@spearce.org","sentAt":"2008-05-26T02:18:01Z","receivedAt":"2008-05-26T02:18:01Z","isPatch":true,"sender":{"key":"spearce@spearce.org","avatar":"https://avatars.githubusercontent.com/u/34844?v=4"},"body":"If a user or group ACL file does not exist in the current tip\nrevision of the acl repository we will get an error from cat-file\nwhen we ask for that blob as it cannot be resolved.  A quick look\nat the history by rev-list can tell us if there is a path there\nor not.\n\nSigned-off-by: Shawn O. Pearce <spearce@spearce.org>\n---\n contrib/hooks/update-paranoid |    1 +\n 1 files changed, 1 insertions(+), 0 deletions(-)\n\ndiff --git a/contrib/hooks/update-paranoid b/contrib/hooks/update-paranoid\nindex 6e0d97c..ae94822 100644\n--- a/contrib/hooks/update-paranoid\n+++ b/contrib/hooks/update-paranoid\n@@ -136,6 +136,7 @@ sub parse_config ($$$$) {\n \tlocal $ENV{GIT_DIR} = shift;\n \tmy $br = shift;\n \tmy $fn = shift;\n+\treturn unless git_value('rev-list','--max-count=1',$br,'--',$fn);\n \tinfo \"Loading $br:$fn\";\n \topen(I,'-|','git','cat-file','blob',\"$br:$fn\");\n \tmy $section = '';\n-- \n1.5.5.1.501.gefb4\n"}]}