[diffoscope] 01/03: Removed duplicated functions from diff.py.
Maria Glukhova
siamezzze-guest at moszumanska.debian.org
Sun May 7 16:14:36 CEST 2017
This is an automated email from the git hooks/post-receive script.
siamezzze-guest pushed a commit to branch experimental
in repository diffoscope.
commit c1d8c1f8f591d7254034437c1ffd4057f9cdf8ce
Author: Maria Glukhova <siamezzze at gmail.com>
Date: Sun May 7 14:02:43 2017 +0300
Removed duplicated functions from diff.py.
make_feeder_from_raw_reader and empty_file_feeder are defined in both diff.py and difference.py.
Only the ones in difference.py are actually used.
---
diffoscope/diff.py | 34 ----------------------------------
1 file changed, 34 deletions(-)
diff --git a/diffoscope/diff.py b/diffoscope/diff.py
index 2b6a277..a300217 100644
--- a/diffoscope/diff.py
+++ b/diffoscope/diff.py
@@ -235,40 +235,6 @@ class FIFOFeeder(threading.Thread):
if self._exception is not None:
raise self._exception
-
-def empty_file_feeder():
- def feeder(f):
- return False
- return feeder
-
-def make_feeder_from_raw_reader(in_file, filter=lambda buf: buf):
- def feeder(out_file):
- h = None
- end_nl = False
- max_lines = Config().max_diff_input_lines
- line_count = 0
-
- if max_lines < float("inf"):
- h = hashlib.sha1()
-
- for buf in in_file:
- line_count += 1
- out = filter(buf)
- if h:
- h.update(out)
- if line_count < max_lines:
- out_file.write(out)
- end_nl = buf[-1] == '\n'
-
- if h and line_count >= max_lines:
- out_file.write("[ Too much input for diff (SHA1: {}) ]\n".format(
- h.hexdigest(),
- ).encode('utf-8'))
- end_nl = True
-
- return end_nl
- return feeder
-
def diff(feeder1, feeder2):
tmpdir = get_temporary_directory().name
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/reproducible/diffoscope.git
More information about the diffoscope
mailing list