Kiln » Dependencies » Dulwich Read More
Clone URL:  
Pushed to one repository · View In Graph Contained in master

Pass lookup function into tree_lookup_path rather than dictionary-like object.

Changeset 5431bcb31592

Parent 5a3eec8ea43c

by Jelmer Vernooij

Changes to one file · Browse files at 5431bcb31592 Showing diff from parent 5a3eec8ea43c Diff from another changeset...

 
288
289
290
291
 
292
293
294
295
 
296
297
298
299
300
301
 
 
288
289
290
 
291
292
293
294
 
295
296
297
298
299
300
 
301
@@ -288,14 +288,14 @@
  return len(list(self.itershas()))     -def tree_lookup_path(object_store, root_sha, path): +def tree_lookup_path(lookup_obj, root_sha, path):   parts = path.split("/")   sha = root_sha   for p in parts: - obj = object_store[sha] + obj = lookup_obj(sha)   if type(obj) is not Tree:   raise NotTreeError(sha)   if p == '':   continue   mode, sha = obj[p] - return object_store[sha] + return lookup_obj(sha)