]> git.ipfire.org Git - thirdparty/git.git/blobdiff - tree-walk.c
Sync with 2.15.3
[thirdparty/git.git] / tree-walk.c
index d459feda2390735fb4e3a26e00444946a6b31353..63a87ed666bbb10cb3c2bd0e27117ac696e7d1b3 100644 (file)
@@ -78,15 +78,16 @@ int init_tree_desc_gently(struct tree_desc *desc, const void *buffer, unsigned l
        return result;
 }
 
-void *fill_tree_descriptor(struct tree_desc *desc, const unsigned char *sha1)
+void *fill_tree_descriptor(struct tree_desc *desc, const struct object_id *oid)
 {
        unsigned long size = 0;
        void *buf = NULL;
 
-       if (sha1) {
-               buf = read_object_with_reference(sha1, tree_type, &size, NULL);
+       if (oid) {
+               buf = read_object_with_reference(oid->hash, tree_type, &size,
+                                                NULL);
                if (!buf)
-                       die("unable to read tree %s", sha1_to_hex(sha1));
+                       die("unable to read tree %s", oid_to_hex(oid));
        }
        init_tree_desc(desc, buf, size);
        return buf;
@@ -1010,7 +1011,8 @@ static enum interesting do_match(const struct name_entry *entry,
                                 * character.  More accurate matching can then
                                 * be performed in the submodule itself.
                                 */
-                               if (ps->recursive && S_ISGITLINK(entry->mode) &&
+                               if (ps->recurse_submodules &&
+                                   S_ISGITLINK(entry->mode) &&
                                    !ps_strncmp(item, match + baselen,
                                                entry->path,
                                                item->nowildcard_len - baselen))
@@ -1059,7 +1061,7 @@ match_wildcards:
                 * character.  More accurate matching can then
                 * be performed in the submodule itself.
                 */
-               if (ps->recursive && S_ISGITLINK(entry->mode) &&
+               if (ps->recurse_submodules && S_ISGITLINK(entry->mode) &&
                    !ps_strncmp(item, match, base->buf + base_offset,
                                item->nowildcard_len)) {
                        strbuf_setlen(base, base_offset + baselen);