aboutsummaryrefslogtreecommitdiffstats
path: root/diff.h
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.h
parentdiff: return diff_filepair from diff queue helpers (diff)
downloadgit-c8a8e04099a99d6eafbe6e9bb1db3b50996836f8.tar.gz
git-c8a8e04099a99d6eafbe6e9bb1db3b50996836f8.zip
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.h')
-rw-r--r--diff.h8
1 files changed, 8 insertions, 0 deletions
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 *);