summaryrefslogtreecommitdiff
path: root/contrib/mw-to-git/Makefile
diff options
context:
space:
mode:
authorLibravatar Jeff King <peff@peff.net>2020-02-12 21:16:15 -0500
committerLibravatar Junio C Hamano <gitster@pobox.com>2020-02-13 09:08:58 -0800
commit551cf8b655fa73c90dabea633d41b5f10deffaf2 (patch)
tree383f605a4a3c209ce9935ad38d99f8422207047c /contrib/mw-to-git/Makefile
parentGit 2.25 (diff)
downloadtgif-551cf8b655fa73c90dabea633d41b5f10deffaf2.tar.xz
pack-bitmap: factor out type iterator initialization
When count_object_type() wants to iterate over the bitmap of all objects of a certain type, we have to pair up OBJ_COMMIT with bitmap->commits, and so forth. Since we're about to add more code to iterate over these bitmaps, let's pull the initialization into its own function. We can also use this to simplify traverse_bitmap_commit_list(). It accomplishes the same thing by manually passing the object type and the bitmap to show_objects_for_type(), but using our helper we just need the object type. Note there's one small code change here: previously we'd simply return zero when counting an unknown object type, and now we'll BUG(). This shouldn't matter in practice, as all of the callers pass in only usual commit/tree/blob/tag types. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'contrib/mw-to-git/Makefile')
0 files changed, 0 insertions, 0 deletions