Merge branch 'nd/attr-pathspec-fix' into maint
[gitweb.git] / submodule.c
index 50cbf5f13ed84c5da081b4130bbd50b7b97e3121..4a5212bdfb4ab9ce5aac4a4c4460fbc9c9ecff38 100644 (file)
@@ -65,8 +65,7 @@ int is_staging_gitmodules_ok(struct index_state *istate)
        if ((pos >= 0) && (pos < istate->cache_nr)) {
                struct stat st;
                if (lstat(GITMODULES_FILE, &st) == 0 &&
-                   ie_match_stat(istate, istate->cache[pos], &st,
-                                 CE_MATCH_IGNORE_FSMONITOR) & DATA_CHANGED)
+                   ie_match_stat(istate, istate->cache[pos], &st, 0) & DATA_CHANGED)
                        return 0;
        }
 
@@ -1534,18 +1533,6 @@ int bad_to_remove_submodule(const char *path, unsigned flags)
        return ret;
 }
 
-void submodule_unset_core_worktree(const struct submodule *sub)
-{
-       char *config_path = xstrfmt("%s/modules/%s/config",
-                                   get_git_common_dir(), sub->name);
-
-       if (git_config_set_in_file_gently(config_path, "core.worktree", NULL))
-               warning(_("Could not unset core.worktree setting in submodule '%s'"),
-                         sub->path);
-
-       free(config_path);
-}
-
 static const char *get_super_prefix_or_empty(void)
 {
        const char *s = get_super_prefix();
@@ -1711,8 +1698,6 @@ int submodule_move_head(const char *path,
 
                        if (is_empty_dir(path))
                                rmdir_or_warn(path);
-
-                       submodule_unset_core_worktree(sub);
                }
        }
 out: