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) {
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);
}
}