From faba36cead3879b1a286319cb93266607b2ebb0e Mon Sep 17 00:00:00 2001 From: "sweep-ai[bot]" <128439645+sweep-ai[bot]@users.noreply.github.com> Date: Tue, 16 Jan 2024 05:06:51 +0000 Subject: [PATCH 1/3] feat: Updated scripts/githooks/pre-commit.sh --- scripts/githooks/pre-commit.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/githooks/pre-commit.sh b/scripts/githooks/pre-commit.sh index 56b2890f..01fdcd5f 100644 --- a/scripts/githooks/pre-commit.sh +++ b/scripts/githooks/pre-commit.sh @@ -2,6 +2,7 @@ #!/bin/bash #!/bin/bash #!/usr/bin/env bash +chmod +x scripts/githooks/pre-commit.sh #!/usr/bin/env bash From 4cb8ede86c5f1e8c3df8d745d2064d97ae5c86c5 Mon Sep 17 00:00:00 2001 From: "sweep-ai[bot]" <128439645+sweep-ai[bot]@users.noreply.github.com> Date: Tue, 16 Jan 2024 05:08:23 +0000 Subject: [PATCH 2/3] feat: Updated scripts/githooks/pre-commit.sh --- scripts/githooks/pre-commit.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/githooks/pre-commit.sh b/scripts/githooks/pre-commit.sh index 01fdcd5f..73c2f60c 100644 --- a/scripts/githooks/pre-commit.sh +++ b/scripts/githooks/pre-commit.sh @@ -64,7 +64,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:-50*1000000} # Default 50MB limitInMB=$(( $limit / 1000000 )) function file_too_large(){ From 5d819a686d01a0d70693326a3cba47032445044b Mon Sep 17 00:00:00 2001 From: "sweep-ai[bot]" <128439645+sweep-ai[bot]@users.noreply.github.com> Date: Tue, 16 Jan 2024 05:16:13 +0000 Subject: [PATCH 3/3] feat: Updated scripts/githooks/pre-commit.sh --- scripts/githooks/pre-commit.sh | 19 +++++-------------- 1 file changed, 5 insertions(+), 14 deletions(-) diff --git a/scripts/githooks/pre-commit.sh b/scripts/githooks/pre-commit.sh index 73c2f60c..df81ba87 100644 --- a/scripts/githooks/pre-commit.sh +++ b/scripts/githooks/pre-commit.sh @@ -62,25 +62,17 @@ printMessage "Running local openim pre-commit hook." # flutter format . # 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:-50*1000000} # Default 50MB limitInMB=$(( $limit / 1000000 )) function file_too_large(){ - filename=$0 - filesize=$(( $1 / 2**20 )) - - filesize=$(( $1 \/ 2**20 ))\ncat <