if ((pos >= 0) && (pos < istate->cache_nr)) {
struct stat st;
if (lstat(GITMODULES_FILE, &st) == 0 &&
- ce_match_stat(istate->cache[pos], &st, 0) & DATA_CHANGED)
+ ce_match_stat(istate->cache[pos], &st, CE_MATCH_IGNORE_FSMONITOR) & DATA_CHANGED)
return 0;
}
struct object_id *one, struct object_id *two,
unsigned dirty_submodule)
{
- const struct object_id *old = &empty_tree_oid, *new = &empty_tree_oid;
+ const struct object_id *old = the_hash_algo->empty_tree, *new = the_hash_algo->empty_tree;
struct commit *left = NULL, *right = NULL;
struct commit_list *merge_bases = NULL;
struct child_process cp = CHILD_PROCESS_INIT;
cp.dir = path;
prepare_submodule_repo_env(&cp.env_array);
- argv_array_pushl(&cp.args, "update-ref", "HEAD", new, NULL);
+ argv_array_pushl(&cp.args, "update-ref", "HEAD",
+ "--no-deref", new, NULL);
if (run_command(&cp)) {
ret = -1;