mirror of
https://github.com/correl/codereview.git
synced 2024-11-27 11:09:50 +00:00
Handle empty blobs when diffing
This commit is contained in:
parent
6d9bc6777b
commit
8c28812654
1 changed files with 2 additions and 2 deletions
|
@ -37,8 +37,8 @@ class Diff(object):
|
||||||
diff = difflib.unified_diff(
|
diff = difflib.unified_diff(
|
||||||
a,
|
a,
|
||||||
b,
|
b,
|
||||||
fromfile=self.a.path,
|
fromfile=self.a.path if self.a else '/dev/null',
|
||||||
tofile=self.b.path,
|
tofile=self.b.path if self.b else '/dev/null',
|
||||||
n=context,
|
n=context,
|
||||||
lineterm='')
|
lineterm='')
|
||||||
return "\n".join(diff)
|
return "\n".join(diff)
|
||||||
|
|
Loading…
Reference in a new issue