Procházet zdrojové kódy

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

Abderrahim Kitouni před 15 roky
rodič
revize
cdd01d5eed
2 změnil soubory, kde provedl 6 přidání a 1 odebrání
  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):