Ver código fonte

Return object sha and mode rather than object itself in tree_lookup_path.

Abderrahim Kitouni 15 anos atrás
pai
commit
b3edb70797
2 arquivos alterados com 6 adições e 1 exclusões
  1. 5 0
      NEWS
  2. 1 1
      dulwich/object_store.py

+ 5 - 0
NEWS

@@ -1,5 +1,10 @@
 0.3.4	UNRELEASED
 
+ API CHANGES
+
+  * dulwich.object_store.tree_lookup_path will now return the mode and 
+    sha of the object found rather than the object itself.
+
  BUG FIXES
 
   * Use binascii.hexlify / binascii.unhexlify for better performance.

+ 1 - 1
dulwich/object_store.py

@@ -480,7 +480,7 @@ def tree_lookup_path(lookup_obj, root_sha, path):
         if p == '':
             continue
         mode, sha = obj[p]
-    return lookup_obj(sha)
+    return mode, sha
 
 
 class MissingObjectFinder(object):