Subject: [PATCH 00/14] export and use commit_stack

From: René Scharfe <[email-masked]>
Date: Wed, 24 Dec 2025 18:03:13 +0100

There are more than ten different variants of dynamic arrays of commit
pointers.  Pick one implementation, export it, add _init() and _grow()
functions and use it to reduce code duplication.

  revision: export commit_stack
  log: use commit_stack
  midx: use commit_stack
  name-rev: use commit_stack
  remote: use commit_stack for local_commits
  remote: use commit_stack for sent_tips
  remote: use commit_stack for src_commits
  test-reach: use commit_stack

  commit: add commit_stack_init()
  pack-bitmap-write: use commit_stack
  shallow: use commit_stack

  commit: add commit_stack_grow()
  commit-graph: use commit_stack
  commit-reach: use commit_stack

 builtin/log.c         | 31 ++++++++--------
 builtin/name-rev.c    | 17 +++------
 commit-graph.c        | 86 ++++++++++++++++++++-----------------------
 commit-reach.c        | 25 ++++++-------
 commit.c              | 28 ++++++++++++++
 commit.h              | 12 ++++++
 midx-write.c          | 35 ++++++------------
 pack-bitmap-write.c   | 18 ++++-----
 remote.c              | 74 ++++++++++---------------------------
 revision.c            | 23 ------------
 shallow.c             | 44 +++++++++-------------
 shallow.h             |  4 +-
 t/helper/test-reach.c | 34 +++++++----------
 13 files changed, 184 insertions(+), 247 deletions(-)

-- 
2.52.0