aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--diff.c2
-rw-r--r--diff.h8
2 files changed, 9 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);
diff --git a/diff.h b/diff.h
index 63afa17e84..fc791ee2cc 100644
--- a/diff.h
+++ b/diff.h
@@ -353,6 +353,14 @@ struct diff_options {
/* to support internal diff recursion by --follow hack*/
int found_follow;
+ /*
+ * By default, diffcore_std() resolves the statuses for queued diff file
+ * pairs by calling diff_resolve_rename_copy(). If status information
+ * has already been manually set, this option prevents diffcore_std()
+ * from resetting statuses.
+ */
+ int skip_resolving_statuses;
+
/* Callback which allows tweaking the options in diff_setup_done(). */
void (*set_default)(struct diff_options *);