aboutsummaryrefslogtreecommitdiffstats
path: root/diff.h
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2025-08-25 14:22:00 -0700
committerJunio C Hamano <gitster@pobox.com>2025-08-25 14:22:01 -0700
commit109c3df14ccf372c2438a470bdfb566265399f0a (patch)
tree415217dbe55227a07f9602194af1df25c7d6baf5 /diff.h
parentMerge branch 'dk/help-all' (diff)
parentdiff: teach tree-diff a max-depth parameter (diff)
downloadgit-109c3df14ccf372c2438a470bdfb566265399f0a.tar.gz
git-109c3df14ccf372c2438a470bdfb566265399f0a.zip
Merge branch 'tc/diff-tree-max-depth'
"git diff-tree" learned "--max-depth" option. * tc/diff-tree-max-depth: diff: teach tree-diff a max-depth parameter within_depth: fix return for empty path combine-diff: zero memory used for callback filepairs
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 91b3e1c5cf..9bb939a4f1 100644
--- a/diff.h
+++ b/diff.h
@@ -406,6 +406,14 @@ struct diff_options {
struct strmap *additional_path_headers;
int no_free;
+
+ /*
+ * The value '0' is a valid max-depth (for no recursion), and value '-1'
+ * also (for unlimited recursion), so the extra "valid" flag is used to
+ * determined whether the user specified option --max-depth.
+ */
+ int max_depth;
+ int max_depth_valid;
};
unsigned diff_filter_bit(char status);