Merge branch 'js/find-commit-subject-ignore-leading-blanks'
[gitweb.git] / unpack-trees.c
index aea9aa749f2904739b72fef285f148b8b2aa83a8..6bc9512a4516396c7ac0cc0fd5b5cebb01c60cbd 100644 (file)
@@ -509,7 +509,7 @@ static int traverse_trees_recursive(int n, unsigned long dirmask,
        for (i = 0; i < n; i++, dirmask >>= 1) {
                const unsigned char *sha1 = NULL;
                if (dirmask & 1)
-                       sha1 = names[i].sha1;
+                       sha1 = names[i].oid->hash;
                buf[i] = fill_tree_descriptor(t+i, sha1);
        }
 
@@ -625,7 +625,7 @@ static struct cache_entry *create_ce_entry(const struct traverse_info *info, con
        ce->ce_mode = create_ce_mode(n->mode);
        ce->ce_flags = create_ce_flags(stage);
        ce->ce_namelen = len;
-       hashcpy(ce->sha1, n->sha1);
+       hashcpy(ce->sha1, n->oid->hash);
        make_traverse_path(ce->name, info, n);
 
        return ce;
@@ -1533,8 +1533,7 @@ static int verify_absent_1(const struct cache_entry *ce,
 
                path = xmemdupz(ce->name, len);
                if (lstat(path, &st))
-                       ret = error("cannot stat '%s': %s", path,
-                                       strerror(errno));
+                       ret = error_errno("cannot stat '%s'", path);
                else
                        ret = check_ok_to_remove(path, len, DT_UNKNOWN, NULL,
                                                 &st, error_type, o);
@@ -1542,8 +1541,7 @@ static int verify_absent_1(const struct cache_entry *ce,
                return ret;
        } else if (lstat(ce->name, &st)) {
                if (errno != ENOENT)
-                       return error("cannot stat '%s': %s", ce->name,
-                                    strerror(errno));
+                       return error_errno("cannot stat '%s'", ce->name);
                return 0;
        } else {
                return check_ok_to_remove(ce->name, ce_namelen(ce),