diff options
| author | Junio C Hamano <gitster@pobox.com> | 2025-08-25 14:22:00 -0700 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2025-08-25 14:22:01 -0700 |
| commit | 109c3df14ccf372c2438a470bdfb566265399f0a (patch) | |
| tree | 415217dbe55227a07f9602194af1df25c7d6baf5 /combine-diff.c | |
| parent | Merge branch 'dk/help-all' (diff) | |
| parent | diff: teach tree-diff a max-depth parameter (diff) | |
| download | git-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 'combine-diff.c')
| -rw-r--r-- | combine-diff.c | 2 |
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; |
