1
0
mirror of https://github.com/sasjs/core.git synced 2025-12-10 14:04:36 +00:00

chore: removing commit size check

This commit is contained in:
allan
2025-06-29 13:45:48 +01:00
parent a6b52b5d9e
commit a12ea6a7cb

View File

@@ -16,14 +16,3 @@ if [[ "$BRANCH" =~ ^(master|main|develop)$ ]]; then
echo "If so, commit with -n to bypass the pre-commit hook." echo "If so, commit with -n to bypass the pre-commit hook."
exit 1 exit 1
fi fi
## Avoid large commits
# https://www.backblaze.com/blog/how-many-bytes-are-in-a-megabyte-really/
size_limit=$((2 * 2**20)) # 2mbs
# https://git-scm.com/docs/git-rev-list#Documentation/git-rev-list.txt---disk-usage
commit_size=$(git rev-list --disk-usage HEAD^..HEAD)
test "$commit_size" -lt "$size_limit" || (
echo "Commit size is too large: $commit_size > $size_limit"
echo "Force commit using --no-verify"
exit 1
)