Only include valid extensions in blame output (#95).

This commit is contained in:
Adam Waldenberg 2016-02-03 14:22:19 +01:00
parent 6e0365e8ba
commit e543eeaf58

View file

@ -137,7 +137,7 @@ class Blame(object):
row = row.encode("latin-1", "replace") row = row.encode("latin-1", "replace")
row = row.decode("utf-8", "replace").strip("\"").strip("'").strip() row = row.decode("utf-8", "replace").strip("\"").strip("'").strip()
if FileDiff.get_extension(row) in extensions.get_located() and not \ if FileDiff.get_extension(row) in extensions.get_located() and FileDiff.is_valid_extension(row) and not \
filtering.set_filtered(FileDiff.get_filename(row)): filtering.set_filtered(FileDiff.get_filename(row)):
blame_command = filter(None, ["git", "blame", "--line-porcelain", "-w"] + \ blame_command = filter(None, ["git", "blame", "--line-porcelain", "-w"] + \
(["-C", "-C", "-M"] if hard else []) + (["-C", "-C", "-M"] if hard else []) +