Changeset 5b199401b304…
Parent a5d0b8f18b40…
by
Changes to one file · Browse files at 5b199401b304 Showing diff from parent a5d0b8f18b40 Diff from another changeset...
@@ -344,6 +344,12 @@ """Return a list of tuples describing the tree entries"""
return self._entries
+ def __getitem__(self, name):
+ for mode, entry, hexsha in self.entries():
+ if entry == name:
+ return mode, hexsha
+ raise KeyError(name)
+
def _parse_text(self):
"""Grab the entries in the tree"""
count = 0
|
Loading...