From 28f06a1cb215069ef094b51d56cb0a9e4bbf1c17 Mon Sep 17 00:00:00 2001 From: "sweep-ai[bot]" <128439645+sweep-ai[bot]@users.noreply.github.com> Date: Tue, 16 Jan 2024 04:33:02 +0000 Subject: [PATCH] feat: Updated scripts/githooks/pre-commit.sh --- scripts/githooks/pre-commit.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/githooks/pre-commit.sh b/scripts/githooks/pre-commit.sh index 7414ad8c..d6c7b128 100644 --- a/scripts/githooks/pre-commit.sh +++ b/scripts/githooks/pre-commit.sh @@ -24,7 +24,7 @@ chmod +x scripts/githooks/pre-commit.sh # This is a pre-commit hook that ensures attempts to commit files that are # are larger than $limit to your _local_ repo fail, with a helpful error message. -# You can override the default limit of 2MB by supplying the environment variable: +# You can override the default limit of 2MB or GIT_FILE_SIZE_LIMIT by supplying the environment variable: # GIT_FILE_SIZE_LIMIT=2000000 git commit -m "test: this commit is allowed file sizes up to 50MB" # GIT_FILE_SIZE_LIMIT=2000000 git commit -m "test: this commit is allowed file sizes up to 50MB" # @@ -59,7 +59,7 @@ printMessage "Running local openim pre-commit hook." # https://gist.github.com/cubxxw/126b72104ac0b0ca484c9db09c3e5694#file-githook-md # TODO! GIT_FILE_SIZE_LIMIT=2000000 git commit -m "test: this commit is allowed file sizes up to 50MB" # Maximum file size limit in bytes -limit=${GIT_FILE_SIZE_LIMIT:-50000000} # Default 50MB +limit=${GIT_FILE_SIZE_LIMIT:-2000000} # Default 2MB limitInMB=$(( $limit / 1000000 )) function file_too_large(){