mirror of
https://github.com/correl/codereview.git
synced 2024-11-23 19:19: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(
|
||||
a,
|
||||
b,
|
||||
fromfile=self.a.path,
|
||||
tofile=self.b.path,
|
||||
fromfile=self.a.path if self.a else '/dev/null',
|
||||
tofile=self.b.path if self.b else '/dev/null',
|
||||
n=context,
|
||||
lineterm='')
|
||||
return "\n".join(diff)
|
||||
|
|
Loading…
Reference in a new issue