Merge branch 'en/t3433-rebase-stat-dirty-failure' into maint
The merge-recursive machinery failed to refresh the cache entry for a merge result in a couple of places, resulting in an unnecessary merge failure, which has been fixed. * en/t3433-rebase-stat-dirty-failure: merge-recursive: fix the refresh logic in update_file_flags t3433: new rebase testcase documenting a stat-dirty-like failure
This commit is contained in:
@ -998,10 +998,13 @@ static int update_file_flags(struct merge_options *opt,
|
||||
free(buf);
|
||||
}
|
||||
update_index:
|
||||
if (!ret && update_cache)
|
||||
if (add_cacheinfo(opt, contents, path, 0, update_wd,
|
||||
if (!ret && update_cache) {
|
||||
int refresh = (!opt->priv->call_depth &&
|
||||
contents->mode != S_IFGITLINK);
|
||||
if (add_cacheinfo(opt, contents, path, 0, refresh,
|
||||
ADD_CACHE_OK_TO_ADD))
|
||||
return -1;
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user