瀏覽代碼

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

Abderrahim Kitouni 15 年之前
父節點
當前提交
cdd01d5eed
共有 2 個文件被更改,包括 6 次插入1 次删除
  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):