From 1653cf8c7c6aa7af6264dbe3a5b75367552f841a Mon Sep 17 00:00:00 2001 From: Gera Shegalov Date: Thu, 10 Jun 2021 10:34:04 -0700 Subject: [PATCH 1/4] wip Signed-off-by: Gera Shegalov --- .pre-commit-config.yaml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index d7c128f4971..a02e8a6468f 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -21,4 +21,8 @@ repos: language: script pass_filenames: true verbose: true + - repo: https://github.com/pre-commit/pre-commit-hooks.git + rev: v4.0.1 + hooks: + - id: check-added-large-files From 98bfbe844c04b729f88159eb6ea72249ab6a0ebc Mon Sep 17 00:00:00 2001 From: Gera Shegalov Date: Thu, 10 Jun 2021 11:14:21 -0700 Subject: [PATCH 2/4] Add pre-commit hook to reject file sizes over 50M Signed-off-by: Gera Shegalov --- .pre-commit-config.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index a02e8a6468f..6763083c069 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -25,4 +25,5 @@ repos: rev: v4.0.1 hooks: - id: check-added-large-files + args: ['--maxkb=51200', '--enforce-all'] From 236ec237990fce2d770e8e136a9e13a46555dcb4 Mon Sep 17 00:00:00 2001 From: Gera Shegalov Date: Thu, 10 Jun 2021 11:16:46 -0700 Subject: [PATCH 3/4] description --- .pre-commit-config.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 6763083c069..a7d069af3ce 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -25,5 +25,6 @@ repos: rev: v4.0.1 hooks: - id: check-added-large-files + name: Reject files over 50M args: ['--maxkb=51200', '--enforce-all'] From 1bf0f5e84f99c7600759098bb6bd54d324f0ea53 Mon Sep 17 00:00:00 2001 From: Gera Shegalov Date: Thu, 10 Jun 2021 12:23:25 -0700 Subject: [PATCH 4/4] 1.5MiB --- .pre-commit-config.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index a7d069af3ce..38b70ce3fb0 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -25,6 +25,6 @@ repos: rev: v4.0.1 hooks: - id: check-added-large-files - name: Reject files over 50M - args: ['--maxkb=51200', '--enforce-all'] + name: Check for file over 1.5MiB + args: ['--maxkb=1500', '--enforce-all']