aboutsummaryrefslogtreecommitdiffstats
path: root/combine-diff.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2025-08-15 15:02:44 -0700
committerJunio C Hamano <gitster@pobox.com>2025-08-15 15:02:45 -0700
commitdddb2275d413451f7a01ff3f6c08fe0c6ce8f7b9 (patch)
treebbe47c3793ee63e5689a5101abeb9f933efb0f42 /combine-diff.c
parentMerge branch 'ly/diff-name-only-with-diff-from-content' into next (diff)
parentdiff: teach tree-diff a max-depth parameter (diff)
downloadgit-dddb2275d413451f7a01ff3f6c08fe0c6ce8f7b9.tar.gz
git-dddb2275d413451f7a01ff3f6c08fe0c6ce8f7b9.zip
Merge branch 'tc/diff-tree-max-depth' into next
"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 'combine-diff.c')
-rw-r--r--combine-diff.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/combine-diff.c b/combine-diff.c
index 4ea2dc93c4..3878faabe7 100644
--- a/combine-diff.c
+++ b/combine-diff.c
@@ -1315,7 +1315,7 @@ static struct diff_filepair *combined_pair(struct combine_diff_path *p,
struct diff_filepair *pair;
struct diff_filespec *pool;
- pair = xmalloc(sizeof(*pair));
+ CALLOC_ARRAY(pair, 1);
CALLOC_ARRAY(pool, st_add(num_parent, 1));
pair->one = pool + 1;
pair->two = pool;