mirror of
https://github.com/correl/codereview.git
synced 2024-11-14 19:19:27 +00:00
Fixed an error when trying to show the initial commit diff
This commit is contained in:
parent
6d22447153
commit
8a2f7a455b
1 changed files with 6 additions and 1 deletions
|
@ -166,7 +166,12 @@ class Git(VCS):
|
|||
a = b.parents[:1]
|
||||
else:
|
||||
a = self._repo.commit(a)
|
||||
for diff in b.diff(a):
|
||||
if a:
|
||||
diffs = b.diff(a)
|
||||
else:
|
||||
# No parents, use the default behaviour (safe for bare repos)
|
||||
diffs = b.diff()
|
||||
for diff in diffs:
|
||||
# b and a are swapped so the parent diff will work as a list of
|
||||
# parents. Therefore, we'll swap them back when we put them into our
|
||||
# Diff object.
|
||||
|
|
Loading…
Reference in a new issue