Do not print a noisy warning when there is no .licenseignore file.
authorWard Vandewege <ward@curii.com>
Mon, 15 Jun 2020 19:04:32 +0000 (15:04 -0400)
committerWard Vandewege <ward@curii.com>
Mon, 15 Jun 2020 19:04:32 +0000 (15:04 -0400)
No issue #

Arvados-DCO-1.1-Signed-off-by: Ward Vandewege <ward@curii.com>

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)