summaryrefslogtreecommitdiff
path: root/merge-blobs.c
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2025-08-07 22:52:58 +0200
committerJunio C Hamano <gitster@pobox.com>2025-08-07 15:29:35 -0700
commita1dfa5448d583bbfd1ec45642a4495ad499970c9 (patch)
treec57bd65d0f3e6013e0d808fbecaa0244c42672f2 /merge-blobs.c
parent2a43e0e5503f52fd4c06faddf6c83b5678dedfe3 (diff)
diff: teach tree-diff a max-depth parameter
When you are doing a tree-diff, there are basically two options: do not recurse into subtrees at all, or recurse indefinitely. While most callers would want to always recurse and see full pathnames, some may want the efficiency of looking only at a particular level of the tree. This is currently easy to do for the top-level (just turn off recursion), but you cannot say "show me what changed in subdir/, but do not recurse". This patch adds a max-depth parameter which is measured from the closest pathspec match, so that you can do: git log --raw --max-depth=1 -- a/b/c and see the raw output for a/b/c/, but not those of a/b/c/d/ (instead of the raw output you would see for a/b/c/d). Co-authored-by: Toon Claes <toon@iotcl.com> Signed-off-by: Toon Claes <toon@iotcl.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'merge-blobs.c')
0 files changed, 0 insertions, 0 deletions