summaryrefslogtreecommitdiff
path: root/pack-bitmap.h
diff options
context:
space:
mode:
authorTaylor Blau <me@ttaylorr.com>2020-12-08 22:05:09 (GMT)
committerJunio C Hamano <gitster@pobox.com>2020-12-08 22:49:04 (GMT)
commit98c31f366a1770fb7ea04125ff2d8b1ea1f7d0d7 (patch)
tree8d941547fb3637598d64533aa97097fed4763a37 /pack-bitmap.h
parent449fa5ee06906ca6d109e06b14cb4f8ea60a6c88 (diff)
downloadgit-98c31f366a1770fb7ea04125ff2d8b1ea1f7d0d7.zip
git-98c31f366a1770fb7ea04125ff2d8b1ea1f7d0d7.tar.gz
git-98c31f366a1770fb7ea04125ff2d8b1ea1f7d0d7.tar.bz2
pack-bitmap: factor out 'bitmap_for_commit()'
A couple of callers within pack-bitmap.c duplicate logic to lookup a given object id in the bitamps khash. Factor this out into a new function, 'bitmap_for_commit()' to reduce some code duplication. Make this new function non-static, since it will be used in later commits from outside of pack-bitmap.c. Signed-off-by: Taylor Blau <me@ttaylorr.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'pack-bitmap.h')
-rw-r--r--pack-bitmap.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/pack-bitmap.h b/pack-bitmap.h
index afa4115..25dfcf5 100644
--- a/pack-bitmap.h
+++ b/pack-bitmap.h
@@ -78,6 +78,8 @@ uint32_t *create_bitmap_mapping(struct bitmap_index *bitmap_git,
int rebuild_bitmap(const uint32_t *reposition,
struct ewah_bitmap *source,
struct bitmap *dest);
+struct ewah_bitmap *bitmap_for_commit(struct bitmap_index *bitmap_git,
+ struct commit *commit);
void bitmap_writer_select_commits(struct commit **indexed_commits,
unsigned int indexed_commits_nr, int max_bitmaps);
void bitmap_writer_build(struct packing_data *to_pack);