[Reproducible-commits] [debbindiff] 05/09: Only skip the first two lines of diffs in text mode
Jérémy Bobbio
lunar at moszumanska.debian.org
Sun Feb 15 11:29:54 UTC 2015
This is an automated email from the git hooks/post-receive script.
lunar pushed a commit to annotated tag 9
in repository debbindiff.
commit 0917298dc79367921d8c269b4472b34e623336a4
Author: Jérémy Bobbio <lunar at debian.org>
Date: Sun Feb 15 10:16:54 2015 +0000
Only skip the first two lines of diffs in text mode
Otherwise, as Helmut pointed out, we will skip Haskell comments or other lines
during the diff.
---
debbindiff/presenters/text.py | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/debbindiff/presenters/text.py b/debbindiff/presenters/text.py
index 5330439..4095735 100644
--- a/debbindiff/presenters/text.py
+++ b/debbindiff/presenters/text.py
@@ -27,7 +27,11 @@ def print_difference(difference, print_func):
for line in difference.comment.split('\n'):
print_func("│┄ %s" % line)
if difference.lines1 or difference.lines2:
- for line in difflib.unified_diff(difference.lines1, difference.lines2):
+ g = difflib.unified_diff(difference.lines1, difference.lines2)
+ # First skip lines with filename
+ g.next()
+ g.next()
+ for line in g:
if line.startswith('--- ') or line.startswith('+++ '):
continue
print_func("│ %s" % line.encode('utf-8'), end='')
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/reproducible/debbindiff.git
More information about the Reproducible-commits
mailing list