Changeset bb188d92ce39…
Parent d109a4c1cc69…
by
Changes to 2 files · Browse files at bb188d92ce39 Showing diff from parent d109a4c1cc69 Diff from another changeset...
@@ -109,21 +109,13 @@ """
return iter(MissingObjectFinder(self, haves, wants, progress).next, None)
- def get_commit_parents(self, sha):
- """Retrieve the parents of a commit.
-
- :param sha: SHA1 of the commit
- :return: List of parent SHA1s
- """
- return self[sha].parents
-
def get_graph_walker(self, heads):
"""Obtain a graph walker for this object store.
:param heads: Local heads to start search with
:return: GraphWalker object
"""
- return ObjectStoreGraphWalker(heads, self.get_commit_parents)
+ return ObjectStoreGraphWalker(heads, lambda sha: self[sha].parents)
class DiskObjectStore(BaseObjectStore):
|
@@ -298,7 +298,7 @@ return self.object_store[sha]
def get_parents(self, sha):
- return self.object_store.get_commit_parents(sha)
+ return self.commit(sha).parents
def commit(self, sha):
return self._get_object(sha, Commit)
|
Loading...