[misc] 03/03: has-only: drop things over 50kb
Chris West
faux-guest at moszumanska.debian.org
Sat May 6 15:20:12 UTC 2017
This is an automated email from the git hooks/post-receive script.
faux-guest pushed a commit to branch master
in repository misc.
commit 2a37d872124937c75e5359f042219083427c1772
Author: Chris West (Faux) <git at goeswhere.com>
Date: Sat May 6 17:20:07 2017 +0200
has-only: drop things over 50kb
---
has-only.py | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/has-only.py b/has-only.py
index d364cc9..c3d1d8a 100755
--- a/has-only.py
+++ b/has-only.py
@@ -11,6 +11,8 @@ DO_DIFF_PREFIX = re.compile('(?:│ )+([+-])(.*)')
XXD_LINE = re.compile('[0-9a-f]{8}: (?:[0-9a-f]{4} ){8} (.{16})')
XXD_END = re.compile('[0-9a-f]{8}: [0-9a-f]{2}(?:[0-9a-f]{2}| ) (?:[0-9a-f ]{4} ){7} (.{1,16})')
+TOO_BIG = 1024 * 50
+
def diff_parse(lines):
file = None
@@ -101,6 +103,9 @@ def process(f):
or file.endswith('.rdx-content'):
has.add('rdb')
+ if len(before) > TOO_BIG or len(after) > TOO_BIG:
+ has.add('huge')
+
yield (file, has, before, after)
# if not has:
# raise Exception("unclassified: {}".format((file, before, after)))
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/reproducible/misc.git
More information about the Reproducible-commits
mailing list