We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a6b52b5 commit a12ea6aCopy full SHA for a12ea6a
.git-hooks/pre-commit
@@ -15,15 +15,4 @@ if [[ "$BRANCH" =~ ^(master|main|develop)$ ]]; then
15
echo "You are on branch $BRANCH. Are you sure you want to commit to this branch?"
16
echo "If so, commit with -n to bypass the pre-commit hook."
17
exit 1
18
-fi
19
-
20
-## Avoid large commits
21
-# https://www.backblaze.com/blog/how-many-bytes-are-in-a-megabyte-really/
22
-size_limit=$((2 * 2**20)) # 2mbs
23
-# https://git-scm.com/docs/git-rev-list#Documentation/git-rev-list.txt---disk-usage
24
-commit_size=$(git rev-list --disk-usage HEAD^..HEAD)
25
-test "$commit_size" -lt "$size_limit" || (
26
- echo "Commit size is too large: $commit_size > $size_limit"
27
- echo "Force commit using --no-verify"
28
- exit 1
29
-)
+fi
0 commit comments