- header = `git show #{tmp[0]} | head -n20 | egrep -A3 -B1 'Copyright.*All rights reserved.'`
- broken = check_file(filename, header, broken)
+ # test if this is a symlink.
+ # Get the tree for each revision we are considering, find the blob hash in there, check the mode at start of line.
+ # Stop looking at revisions once we have a match.
+ symlink = false
+ commits.each do |r|
+ tree = `git cat-file -p #{r}^{tree}`
+ if tree =~ /#{tmp[0]}/
+ if tree =~ /^120000.blob.#{tmp[0]}/
+ symlink = true
+ end
+ break
+ end
+ end
+ if symlink == false
+ header = `git show #{tmp[0]} | head -n20 | egrep -A3 -B1 'Copyright.*All rights reserved.'`
+ broken = check_file(filename, header, broken)
+ else
+ #puts "#{filename} is a symbolic link, skipping"
+ end