X-Git-Url: https://git.arvados.org/arvados-dev.git/blobdiff_plain/a4fabe9c50a723d92be7e32c0b88738e32fcb58e..26d57e45a7216568795ed8566cbc5529c6fe1983:/git/hooks/check-copyright-headers.rb diff --git a/git/hooks/check-copyright-headers.rb b/git/hooks/check-copyright-headers.rb index b4b8d94..2f6b20d 100755 --- a/git/hooks/check-copyright-headers.rb +++ b/git/hooks/check-copyright-headers.rb @@ -50,13 +50,13 @@ def check_copyright_headers all_objects = [] commits = [] elsif ($oldrev[0,6] == '000000') - if $refname != 'refs/heads/master' + if $refname != 'refs/heads/main' # A new branch was pushed. Check all new commits in this branch. - puts "git rev-list --objects master..#{$newrev} | git cat-file --batch-check='%(objecttype) %(objectname) %(objectsize) %(rest)'| sed -n 's/^blob //p'" - blob_objects = `git rev-list --objects master..#{$newrev} | git cat-file --follow-symlinks --batch-check='%(objecttype) %(objectname) %(objectsize) %(rest)'| sed -n 's/^blob //p'`.split("\n") - commit_objects = `git rev-list --objects master..#{$newrev} | git cat-file --batch-check='%(objecttype) %(objectname) %(objectsize) %(rest)'| sed -n 's/^commit //p'`.split("\n") + puts "git rev-list --objects main..#{$newrev} | git cat-file --batch-check='%(objecttype) %(objectname) %(objectsize) %(rest)'| sed -n 's/^blob //p'" + blob_objects = `git rev-list --objects main..#{$newrev} | git cat-file --follow-symlinks --batch-check='%(objecttype) %(objectname) %(objectsize) %(rest)'| sed -n 's/^blob //p'`.split("\n") + commit_objects = `git rev-list --objects main..#{$newrev} | git cat-file --batch-check='%(objecttype) %(objectname) %(objectsize) %(rest)'| sed -n 's/^commit //p'`.split("\n") all_objects = blob_objects + commit_objects - commits = `git rev-list master..#{$newrev}`.split("\n") + commits = `git rev-list main..#{$newrev}`.split("\n") else # When does this happen? puts "UNEXPECTED ERROR"