1
0
mirror of https://github.com/deadc0de6/dotdrop.git synced 2026-02-09 09:29:17 +00:00

fix relative cmpignore for #149

This commit is contained in:
deadc0de6
2019-06-08 11:47:30 +02:00
parent a89fae29cf
commit 469a827f7d
3 changed files with 18 additions and 34 deletions

View File

@@ -115,9 +115,9 @@ class Comparator:
def _diff(self, left, right, header=False):
"""diff using the unix tool diff"""
d = diff(left, right, raw=False,
opts=self.diffopts, debug=self.debug)
out = diff(left, right, raw=False,
opts=self.diffopts, debug=self.debug)
if header:
lshort = os.path.basename(left)
d = '=> diff \"{}\":\n{}'.format(lshort, diff)
return d
out = '=> diff \"{}\":\n{}'.format(lshort, out)
return out

View File

@@ -245,7 +245,7 @@ def cmd_compare(o, tmp):
same = False
continue
ignores = list(set(o.compare_ignore + dotfile.cmpignore))
ignores = patch_ignores(ignores, dotfile.src)
ignores = patch_ignores(ignores, dotfile.dst)
diff = comp.compare(insttmp, dotfile.dst, ignore=ignores)
if tmpsrc:
# clean tmp transformed dotfile if any