git-am: initialize variable $resume on startup
[gitweb.git] / unpack-trees.c
index 3b32718436ea4da838c98b53b3dba25bb99e3e9a..dfd985b0ef0193ce311ea77e8c8cb11fc7b1c3e3 100644 (file)
@@ -407,6 +407,15 @@ static void verify_uptodate(struct cache_entry *ce,
                unsigned changed = ce_match_stat(ce, &st, 1);
                if (!changed)
                        return;
+               /*
+                * NEEDSWORK: the current default policy is to allow
+                * submodule to be out of sync wrt the supermodule
+                * index.  This needs to be tightened later for
+                * submodules that are marked to be automatically
+                * checked out.
+                */
+               if (S_ISGITLINK(ntohl(ce->ce_mode)))
+                       return;
                errno = 0;
        }
        if (errno == ENOENT)