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;
}
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();
if (is_empty_dir(path))
rmdir_or_warn(path);
-
- submodule_unset_core_worktree(sub);
}
}
out:
* We're only interested in the name after the tab.
*/
super_sub = strchr(sb.buf, '\t') + 1;
- super_sub_len = sb.buf + sb.len - super_sub - 1;
+ super_sub_len = strlen(super_sub);
if (super_sub_len > cwd_len ||
strcmp(&cwd[cwd_len - super_sub_len], super_sub))