When enforcing copyright headers, do not consider commits that are already part
[arvados-dev.git] / git / hooks / check-copyright-headers.sh
index 18796f24a7ad20e35576fa7c9b5ce97255433a37..53dde73b680efaaf24f1f878935f25e046646d71 100755 (executable)
@@ -30,7 +30,7 @@ rm -f $LICENSEIGNORE
 
 oldIFS="$IFS"
 IFS=$'\n'
-for rev in $(git rev-list --objects $2..$3 | git cat-file --batch-check='%(objecttype) %(objectname) %(objectsize) %(rest)'| sed -n 's/^blob //p'); do
+for rev in $(git rev-list --objects $OLDREV..$NEWREV --not --branches='*' | git cat-file --batch-check='%(objecttype) %(objectname) %(objectsize) %(rest)'| sed -n 's/^blob //p'); do
 
   IFS="$oldIFS" read -r -a array <<<"$rev"
   sha=${array[0]}