From a12ea6a7cbf0e9ff5b629aac321b0ab7cc1723d6 Mon Sep 17 00:00:00 2001 From: allan Date: Sun, 29 Jun 2025 13:45:48 +0100 Subject: [PATCH] chore: removing commit size check --- .git-hooks/pre-commit | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/.git-hooks/pre-commit b/.git-hooks/pre-commit index 2a039c0..e539335 100755 --- a/.git-hooks/pre-commit +++ b/.git-hooks/pre-commit @@ -15,15 +15,4 @@ if [[ "$BRANCH" =~ ^(master|main|develop)$ ]]; then echo "You are on branch $BRANCH. Are you sure you want to commit to this branch?" echo "If so, commit with -n to bypass the pre-commit hook." exit 1 -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 -) +fi \ No newline at end of file