gitignore: lazily find dtype
[gitweb.git] / unpack-trees.c
index aa2513ed798969c02fc5e14097666eb4c4c02bae..29848e926c9a17b2aaf54b924c7176346c5d3d02 100644 (file)
@@ -522,8 +522,9 @@ static void verify_absent(struct cache_entry *ce, const char *action,
 
        if (!lstat(ce->name, &st)) {
                int cnt;
+               int dtype = ce_to_dtype(ce);
 
-               if (o->dir && excluded(o->dir, ce->name))
+               if (o->dir && excluded(o->dir, ce->name, &dtype))
                        /*
                         * ce->name is explicitly excluded, so it is Ok to
                         * overwrite it.