release-tools/do-copyright-year: more efficient skip of D records
authorRichard Levitte <levitte@openssl.org>
Tue, 20 Nov 2018 15:33:12 +0000 (16:33 +0100)
committerRichard Levitte <levitte@openssl.org>
Tue, 20 Nov 2018 15:57:11 +0000 (16:57 +0100)
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/tools/pull/36)

release-tools/do-copyright-year

index 9b70f9ffce2514778b8aa08c2fd93d89970f7b05..2f2c05c479b56322a56aac542c97dfadf9d5c6fd 100755 (executable)
@@ -30,6 +30,7 @@ EOF
 NYD=`date +%Y-01-01`
 echo Updating copryight
 git diff-tree -r --name-status `git rev-list -1 --before=$NYD HEAD`..HEAD | \
+    grep -v '^ *D' | \
     (
        count=0
        sp="/-\|"
@@ -43,7 +44,6 @@ git diff-tree -r --name-status `git rev-list -1 --before=$NYD HEAD`..HEAD | \
        }
 
        while read STATUS FILE ; do
-           if [ "$STATUS" = 'D' ]; then continue; fi
            (( count++ ))
            spin $count
            sed -E -f /tmp/sed$$ -i "$FILE"