The branch master has been updated
       via  191d279c0e11953cd1a3d02e3fe422391cf9674f (commit)
       via  617dbc4a479831adbf711df0879324b23d5f4cb6 (commit)
       via  a89caedb7667bec77ca155ef99b6beacd7a4479c (commit)
      from  1de20a3a49e1b4f6e7104b84b8fc5594b144712a (commit)


- Log -----------------------------------------------------------------
commit 191d279c0e11953cd1a3d02e3fe422391cf9674f
Author: Richard Levitte <levi...@openssl.org>
Date:   Tue Nov 20 16:34:16 2018 +0100

    release-tools/do-copyright-year: skip versioned directories
    
    These are submodules, and we have no interest changing those.
    
    Reviewed-by: Matt Caswell <m...@openssl.org>
    (Merged from https://github.com/openssl/tools/pull/36)

commit 617dbc4a479831adbf711df0879324b23d5f4cb6
Author: Richard Levitte <levi...@openssl.org>
Date:   Tue Nov 20 16:33:12 2018 +0100

    release-tools/do-copyright-year: more efficient skip of D records
    
    Reviewed-by: Matt Caswell <m...@openssl.org>
    (Merged from https://github.com/openssl/tools/pull/36)

commit a89caedb7667bec77ca155ef99b6beacd7a4479c
Author: Richard Levitte <levi...@openssl.org>
Date:   Tue Nov 20 16:30:21 2018 +0100

    release-tools/do-copyright-year: add a spinner+counter to show process
    
    When a lot of changes has happened in a branch, processing all the
    files can take some time, so this adds some visual progress feedback.
    
    Reviewed-by: Matt Caswell <m...@openssl.org>
    (Merged from https://github.com/openssl/tools/pull/36)

-----------------------------------------------------------------------

Summary of changes:
 release-tools/do-copyright-year | 30 ++++++++++++++++++++++++------
 1 file changed, 24 insertions(+), 6 deletions(-)

diff --git a/release-tools/do-copyright-year b/release-tools/do-copyright-year
index 6c3d710..8bebf6a 100755
--- a/release-tools/do-copyright-year
+++ b/release-tools/do-copyright-year
@@ -29,12 +29,30 @@ EOF
 
 NYD=`date +%Y-01-01`
 echo Updating copryight
-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
-    sed -E -f /tmp/sed$$ -i "$FILE"
-    git add "$FILE"
-done
+git diff-tree -r --name-status `git rev-list -1 --before=$NYD HEAD`..HEAD | \
+    grep -v '^ *D' | \
+    (
+       count=0
+       sp="/-\|"
+       sc=0
+       spin() {
+           printf "\r${sp:sc++:1} %s" "$@"
+           ((sc==${#sp})) && sc=0
+       }
+       endspin() {
+           printf "\r%s\n" "$@"
+       }
+
+       while read STATUS FILE ; do
+           if [ -d "$FILE" ]; then continue; fi
+           (( count++ ))
+           spin $count
+           sed -E -f /tmp/sed$$ -i "$FILE"
+           git add "$FILE"
+       done
+       endspin "Files considered: $count"
+    )
+echo Files changed: $(git status --porcelain | grep '^ *M' | wc -l)
 echo Committing change locally.
 git commit -m 'Update copyright year'
 rm -f $ss
_____
openssl-commits mailing list
To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-commits

Reply via email to