~edwargix/git.sr.ht

544a50468caf0332ca247fc59b8ba7cbd21e293c — Drew DeVault 6 years ago e61c38d
Fix trees whose entries have the same hash
1 files changed, 1 insertions(+), 3 deletions(-)

M gitsrht/git.py
M gitsrht/git.py => gitsrht/git.py +1 -3
@@ 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}"