]> git.ipfire.org Git - thirdparty/git.git/blobdiff - tree-walk.h
tree-walk: init_tree_desc take an oid to get the hash algorithm
[thirdparty/git.git] / tree-walk.h
index 74cdceb3fed258eb7216ebec1fe8a86aef0fa264..cf54d01019e9bcbd169b78aaa95a431b06d924dc 100644 (file)
@@ -26,6 +26,7 @@ struct name_entry {
  * A semi-opaque data structure used to maintain the current state of the walk.
  */
 struct tree_desc {
+       const struct git_hash_algo *algo;
        /*
         * pointer into the memory representation of the tree. It always
         * points at the current entry being visited.
@@ -85,9 +86,11 @@ int update_tree_entry_gently(struct tree_desc *);
  * size parameters are assumed to be the same as the buffer and size
  * members of `struct tree`.
  */
-void init_tree_desc(struct tree_desc *desc, const void *buf, unsigned long size);
+void init_tree_desc(struct tree_desc *desc, const struct object_id *tree_oid,
+                   const void *buf, unsigned long size);
 
-int init_tree_desc_gently(struct tree_desc *desc, const void *buf, unsigned long size,
+int init_tree_desc_gently(struct tree_desc *desc, const struct object_id *oid,
+                         const void *buf, unsigned long size,
                          enum tree_desc_flags flags);
 
 /*