From 99fb28d9d051baee0f0cb0588913676535082914 Mon Sep 17 00:00:00 2001 From: Ward Vandewege Date: Fri, 25 May 2018 16:48:14 -0400 Subject: [PATCH] When enforcing copyright headers, do not consider commits that are already part of the git history of the repository. No issue # Arvados-DCO-1.1-Signed-off-by: Ward Vandewege --- git/hooks/check-copyright-headers.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/git/hooks/check-copyright-headers.sh b/git/hooks/check-copyright-headers.sh index 18796f2..53dde73 100755 --- a/git/hooks/check-copyright-headers.sh +++ b/git/hooks/check-copyright-headers.sh @@ -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]} -- 2.30.2