[PATCH 0/3] git-receive-pack(1): optimize `assign_shallow_commits_to_refs()`
- From
Patrick Steinhardt <ps@pks.im>
- Date
- Feb 16, 2026, 15:38 UTC
- Message-ID
- <20260216-b4-pks-receive-pack-optimize-shallow-v1-0-e98886daff2b@pks.im>
Hi,
this patch series optimizes how git-receive-pack(1) handles shallow pushes in `assign_shallow_commits_to_refs()`. This covers some edge cases that we have hit in a production repository, where shallow pushes could take many minutes and allocate a ton of memory.
Thanks!
Patrick
---
Patrick Steinhardt (3):
commit: avoid parsing non-commits in `lookup_commit_reference_gently()`
commit: make `repo_parse_commit_no_graph()` more robust
commit: use commit graph in `lookup_commit_reference_gently()`commit.c | 32 +++++++++++++++++++++++++++----- commit.h | 14 ++++++++++++-- contrib/coccinelle/commit.cocci | 2 +- object.c | 23 ++++++++++++++++++----- object.h | 5 +++++ 5 files changed, 63 insertions(+), 13 deletions(-)
--- base-commit: 852829b3dd2fe4e7c7fc4d8badde644cf1b66c74 change-id: 20260216-b4-pks-receive-pack-optimize-shallow-0a6cc508549d