Do not print a noisy warning when there is no .licenseignore file.
[arvados-dev.git] / git / hooks / check-copyright-headers.rb
index 6788c5dd6074ff082ede9b698e58e2ad65990044..e5d86a1b4bc95a8a80694069a4abbb7e686d39a1 100755 (executable)
@@ -21,7 +21,7 @@ puts "Enforcing copyright headers..."
 puts "(#{$refname}) (#{$oldrev[0,6]}) (#{$newrev[0,6]})"
 
 def load_licenseignore
-  $licenseignore = `git show #{$newrev}:.licenseignore`.gsub(/\./,'\\.').gsub(/\*/,'.*').gsub(/\?/,'.').split("\n")
+  $licenseignore = `git show #{$newrev}:.licenseignore 2>/dev/null`.gsub(/\./,'\\.').gsub(/\*/,'.*').gsub(/\?/,'.').split("\n")
 end
 
 def check_file(filename, header, broken)