From ad1fe4235296a5b2707eeb91f0c0f9fecb45dbc4 Mon Sep 17 00:00:00 2001 From: "Xinwei Xiong(cubxxw)" <3293172751nss@gmail.com> Date: Mon, 15 May 2023 11:35:38 +0800 Subject: [PATCH] style: optimize the limit of githook commit Signed-off-by: Xinwei Xiong(cubxxw) <3293172751nss@gmail.com> --- script/githooks/pre-commit | 3 ++- script/make-rules/common.mk | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/script/githooks/pre-commit b/script/githooks/pre-commit index 9cd54db7e..a52d77f5c 100644 --- a/script/githooks/pre-commit +++ b/script/githooks/pre-commit @@ -36,7 +36,8 @@ printMessage "Running local OpenIM pre-commit hook." #flutter format . ##https://gist.github.com/benmccallum/28e4f216d9d72f5965133e6c43aaff6e -limit=$(( 1 * 2**20 )) # 1MB +# TODO! GIT_FILE_SIZE_LIMIT=42000000 git commit -m "This commit is allowed file sizes up to 42MB" +limit=$(( 2 * 2**20 )) # 2MB function file_too_large(){ filename=$0 diff --git a/script/make-rules/common.mk b/script/make-rules/common.mk index 9da3d381b..cf3244eb1 100644 --- a/script/make-rules/common.mk +++ b/script/make-rules/common.mk @@ -120,6 +120,7 @@ MAKEFLAGS += --no-print-directory endif # Copy githook scripts when execute makefile +# TODO! GIT_FILE_SIZE_LIMIT=42000000 git commit -m "This commit is allowed file sizes up to 42MB" COPY_GITHOOK:=$(shell cp -f script/githooks/* .git/hooks/; chmod +x .git/hooks/*) # COMMA: Concatenate multiple strings to form a list of strings