subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r1784378 - /subversion/trunk/tools/hook-scripts/reject-known-sha1-collisions.sh
Date Sat, 25 Feb 2017 13:16:10 GMT
Author: stsp
Date: Sat Feb 25 13:16:10 2017
New Revision: 1784378

URL: http://svn.apache.org/viewvc?rev=1784378&view=rev
Log:
* tools/hook-scripts/reject-known-sha1-collisions.sh: Skip directories
  while looking for the known 320 byte prefix. Fixes a problem where
  the hook failed if a directory was encountered in the transaction:
  svn: E165001: Commit blocked by pre-commit hook (exit code 3) with output:
  svnlook: E160017: Path 'some-dir' is not a file
  known SHA-1 collision rejected

Modified:
    subversion/trunk/tools/hook-scripts/reject-known-sha1-collisions.sh

Modified: subversion/trunk/tools/hook-scripts/reject-known-sha1-collisions.sh
URL: http://svn.apache.org/viewvc/subversion/trunk/tools/hook-scripts/reject-known-sha1-collisions.sh?rev=1784378&r1=1784377&r2=1784378&view=diff
==============================================================================
--- subversion/trunk/tools/hook-scripts/reject-known-sha1-collisions.sh (original)
+++ subversion/trunk/tools/hook-scripts/reject-known-sha1-collisions.sh Sat Feb 25 13:16:10
2017
@@ -39,7 +39,7 @@ if [ $? -ne 0 ]; then
   exit 2
 fi
 
-$SVNLOOK changed -t "$TXN" "$REPOS" | /usr/bin/grep -Ev '^D ' | /usr/bin/sed -e 's/^.   //'
| while read FILE; do
+$SVNLOOK changed -t "$TXN" "$REPOS" | /usr/bin/grep -Ev '^D ' | /usr/bin/sed -e 's/^.   //'
| /usr/bin/grep -v '/$' | while read FILE; do
   PREFIX=`$SVNLOOK cat -t "$TXN" "$REPOS" "$FILE" | $HEAD -c320 | $SHA1SUM | cut -c-40`
   if [ "$PREFIX" == 'f92d74e3874587aaf443d1db961d4e26dde13e9c' ]; then
         echo "known SHA-1 collision rejected" >&2



Mime
View raw message