aboutsummaryrefslogtreecommitdiff
path: root/read-cache.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2026-04-08 10:19:17 -0700
committerJunio C Hamano <gitster@pobox.com>2026-04-08 10:19:18 -0700
commitd8c553bbed21761a8af3fa40a20518e210e78a0d (patch)
tree96b22d1e2c25bbc8dd6564b27cf02ade0ee79831 /read-cache.c
parent4fee6ff3b23321b55073ca2d13c4e2aa6adaea65 (diff)
parentc0ce43376b178d876bce2073b81737ce49657def (diff)
downloadgit-d8c553bbed21761a8af3fa40a20518e210e78a0d.tar.xz
Merge branch 'ng/add-files-to-cache-wo-rename'
add_files_to_cache() used diff_files() to detect only the paths that are different between the index and the working tree and add them, which does not need rename detection, which interfered with unnecessary conflicts. * ng/add-files-to-cache-wo-rename: read-cache: disable renames in add_files_to_cache
Diffstat (limited to 'read-cache.c')
-rw-r--r--read-cache.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/read-cache.c b/read-cache.c
index b1074fbf06..38a04b8de3 100644
--- a/read-cache.c
+++ b/read-cache.c
@@ -4033,6 +4033,7 @@ int add_files_to_cache(struct repository *repo, const char *prefix,
rev.diffopt.format_callback = update_callback;
rev.diffopt.format_callback_data = &data;
rev.diffopt.flags.override_submodule_config = 1;
+ rev.diffopt.detect_rename = 0; /* staging worktree changes does not need renames */
rev.max_count = 0; /* do not compare unmerged paths with stage #2 */
/*