[Cmake-commits] CMake branch, hooks, updated. 1387c7efa00ce996107885e8d806faf50648e04a
cmake-commits at cmake.org
cmake-commits at cmake.org
Mon Jun 7 14:09:27 EDT 2010
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".
The branch, hooks has been updated
via 1387c7efa00ce996107885e8d806faf50648e04a (commit)
from a54ae582f7de41e8a0f54dff5b260dab94aaf9ef (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=1387c7efa00ce996107885e8d806faf50648e04a
commit 1387c7efa00ce996107885e8d806faf50648e04a
Author: Brad King <brad.king at kitware.com>
Date: Mon Jun 7 14:07:38 2010 -0400
pre-commit: Check file size always
Fix logic to call check_size for all updated index entries, not just
those whose mode changed.
diff --git a/pre-commit b/pre-commit
index 69b84b9..75c7f82 100755
--- a/pre-commit
+++ b/pre-commit
@@ -119,8 +119,7 @@ size_too_large() {
echo 'Run "git config hooks.MaxObjectKiB $KiB" to set local limit, 0 to disable.'
}
check_size() {
- if test "$size_max_KiB" -gt "0" \
- -a "$dst_obj" != "$zero" -a "$dst_mode" != '160000'; then
+ if test "$size_max_KiB" -gt "0" -a "$dst_obj" != "$zero"; then
file_KiB=$(expr '(' $(git cat-file -s "$dst_obj") + 1023 ')' / 1024)
test "$file_KiB" -le "$size_max_KiB" || size_too_large
fi
@@ -131,6 +130,8 @@ sed -n '/^:[^:]/ {s/^://;p;}' |
while read src_mode dst_mode src_obj dst_obj status file; do
if test "$src_mode" != "$dst_mode" -a "$dst_mode" != "000000"; then
check_mode
+ fi
+ if test "$dst_mode" != "160000" -a "$dst_mode" != '000000'; then
check_size
fi
done)
-----------------------------------------------------------------------
Summary of changes:
pre-commit | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
hooks/post-receive
--
CMake
More information about the Cmake-commits
mailing list