Merge branch 'rs/object-id' into next
authorJunio C Hamano <gitster@pobox.com>
Sun, 20 Aug 2017 06:07:14 +0000 (23:07 -0700)
committerJunio C Hamano <gitster@pobox.com>
Sun, 20 Aug 2017 06:07:15 +0000 (23:07 -0700)
Conversion from uchar[20] to struct object_id continues.

* rs/object-id:
tree-walk: convert fill_tree_descriptor() to object_id

1  2 
unpack-trees.c
diff --combined unpack-trees.c
index 38000ac8fad4e8cb626b74bf80197e070084246e,233ec5eb3d2463fcc0bb66cac16a864cae728f61..5d5590eee591c6c4a8d92b1e22bbef57a5f41833
@@@ -286,7 -286,7 +286,7 @@@ static void reload_gitmodules_file(stru
        for (i = 0; i < index->cache_nr; i++) {
                struct cache_entry *ce = index->cache[i];
                if (ce->ce_flags & CE_UPDATE) {
 -                      int r = strcmp(ce->name, ".gitmodules");
 +                      int r = strcmp(ce->name, GITMODULES_FILE);
                        if (r < 0)
                                continue;
                        else if (r == 0) {
@@@ -662,10 -662,10 +662,10 @@@ static int traverse_trees_recursive(in
                else if (i > 1 && are_same_oid(&names[i], &names[i - 2]))
                        t[i] = t[i - 2];
                else {
-                       const unsigned char *sha1 = NULL;
+                       const struct object_id *oid = NULL;
                        if (dirmask & 1)
-                               sha1 = names[i].oid->hash;
-                       buf[nr_buf++] = fill_tree_descriptor(t+i, sha1);
+                               oid = names[i].oid;
+                       buf[nr_buf++] = fill_tree_descriptor(t + i, oid);
                }
        }