summaryrefslogtreecommitdiff
path: root/diff.c
diff options
context:
space:
mode:
authorJustin Tobler <jltobler@gmail.com>2025-02-28 15:33:44 -0600
committerJunio C Hamano <gitster@pobox.com>2025-03-03 08:17:47 -0800
commitc8a8e04099a99d6eafbe6e9bb1db3b50996836f8 (patch)
tree9d8a641fb75126a6f01e0e4dd01176d781536ebd /diff.c
parent7c67d2a07055150b76e81efa8850221d52705305 (diff)
diff: add option to skip resolving diff statuses
By default, `diffcore_std()` resolves the statuses for queued diff file pairs by calling `diff_resolve_rename_copy()`. If status information is already manually set, invoking `diffcore_std()` may change the status value. Introduce the `skip_resolving_statuses` diff option that prevents `diffcore_std()` from resolving file pair statuses when enabled. Signed-off-by: Justin Tobler <jltobler@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'diff.c')
-rw-r--r--diff.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/diff.c b/diff.c
index 4ddfe523fe..08f5e00a2c 100644
--- a/diff.c
+++ b/diff.c
@@ -7085,7 +7085,7 @@ void diffcore_std(struct diff_options *options)
diffcore_order(options->orderfile);
if (options->rotate_to)
diffcore_rotate(options);
- if (!options->found_follow)
+ if (!options->found_follow && !options->skip_resolving_statuses)
/* See try_to_follow_renames() in tree-diff.c */
diff_resolve_rename_copy();
diffcore_apply_filter(options);