summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDrew DeVault <sir@cmpwn.com>2019-06-22 16:30:37 -0400
committerDrew DeVault <sir@cmpwn.com>2019-06-22 16:30:37 -0400
commit544a50468caf0332ca247fc59b8ba7cbd21e293c (patch)
treec41667e610b570e26bd0296d641963a432b1cf03
parente61c38d5b8c5d30560a9f892109b5b0bcd16864b (diff)
Fix trees whose entries have the same hash
-rw-r--r--gitsrht/git.py4
1 files changed, 1 insertions, 3 deletions
diff --git a/gitsrht/git.py b/gitsrht/git.py
index 066aca7..e6808b9 100644
--- a/gitsrht/git.py
+++ b/gitsrht/git.py
@@ -98,9 +98,7 @@ class AnnotatedTreeEntry:
return f"<AnnotatedTreeEntry {self.name} {self.id}>"
def annotate_tree(repo, tree, commit):
- tree = { entry.id.hex: AnnotatedTreeEntry(
- repo, entry) for entry in tree }
- return [entry.fetch_blob() for entry in tree.values()]
+ return [AnnotatedTreeEntry(repo, entry).fetch_blob() for entry in tree]
# TODO: This is slow and broken
key = f"git.sr.ht:git:tree:{tree.id.hex}"