]> git.ipfire.org Git - thirdparty/git.git/commit
builtin/cat-file: deduplicate logic to iterate over all objects
authorPatrick Steinhardt <ps@pks.im>
Wed, 2 Apr 2025 11:13:45 +0000 (13:13 +0200)
committerJunio C Hamano <gitster@pobox.com>
Mon, 7 Apr 2025 21:43:52 +0000 (14:43 -0700)
commitd5ec7027bcbf755b95fba84ad1de50ca6d3c3daa
tree1bd829f3d7d6764c44fb51876e4c1bc0e1204614
parentc9b94a7785b4de4e3e15d0e5b65c97337c206b81
builtin/cat-file: deduplicate logic to iterate over all objects

Pull out a common function that allows us to iterate over all objects in
a repository. Right now the logic is trivial and would only require two
function calls, making this refactoring a bit pointless. But in the next
commit we will iterate on this logic to make use of bitmaps, so this is
about to become a bit more complex.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/cat-file.c