summaryrefslogtreecommitdiffstats
path: root/gitsrht/blueprints/repo.py
diff options
context:
space:
mode:
authorDrew DeVault <sir@cmpwn.com>2018-10-11 20:01:31 -0400
committerDrew DeVault <sir@cmpwn.com>2018-10-11 20:02:51 -0400
commitd34594f65006222070deffa3efe6a78cd7f3c56a (patch)
tree203effc378946e7b1dd2da869a4b85d067008b09 /gitsrht/blueprints/repo.py
parent6db5a97fa45c5777ae7aa14b6eff19098269b24e (diff)
Fix diff of initial commit
Diffstat (limited to 'gitsrht/blueprints/repo.py')
-rw-r--r--gitsrht/blueprints/repo.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/gitsrht/blueprints/repo.py b/gitsrht/blueprints/repo.py
index c69d3dd..b5fffd0 100644
--- a/gitsrht/blueprints/repo.py
+++ b/gitsrht/blueprints/repo.py
@@ -289,7 +289,8 @@ def commit(owner, repo, ref):
parent = git_repo.revparse_single(ref + "^")
diff = git_repo.diff(parent, ref)
except KeyError:
- diff = ref.tree.diff_to_tree()
+ parent = None
+ diff = commit.tree.diff_to_tree(swap=True)
diff.find_similar(pygit2.GIT_DIFF_FIND_RENAMES)
refs = collect_refs(git_repo)
return render_template("commit.html", view="log",