summaryrefslogtreecommitdiff
path: root/pack-revindex.h
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2014-02-27 14:01:48 -0800
committerJunio C Hamano <gitster@pobox.com>2014-02-27 14:01:48 -0800
commit0f9e62e0847c075678a7a5a748567d1e881d16f8 (patch)
tree8ef8989069ae40eef891b0964fc2cb8036a74e48 /pack-revindex.h
parent6784fab0ac1f973f22f1d4252f0e513d61be6c6b (diff)
parent6b5b3a27b7faf9d72efec28fa017408daf45cd00 (diff)
downloadgit-0f9e62e0847c075678a7a5a748567d1e881d16f8.tar.gz
Merge branch 'jk/pack-bitmap'
Borrow the bitmap index into packfiles from JGit to speed up enumeration of objects involved in a commit range without having to fully traverse the history. * jk/pack-bitmap: (26 commits) ewah: unconditionally ntohll ewah data ewah: support platforms that require aligned reads read-cache: use get_be32 instead of hand-rolled ntoh_l block-sha1: factor out get_be and put_be wrappers do not discard revindex when re-preparing packfiles pack-bitmap: implement optional name_hash cache t/perf: add tests for pack bitmaps t: add basic bitmap functionality tests count-objects: recognize .bitmap in garbage-checking repack: consider bitmaps when performing repacks repack: handle optional files created by pack-objects repack: turn exts array into array-of-struct repack: stop using magic number for ARRAY_SIZE(exts) pack-objects: implement bitmap writing rev-list: add bitmap mode to speed up object lists pack-objects: use bitmaps when packing objects pack-objects: split add_object_entry pack-bitmap: add support for bitmap indexes documentation: add documentation for the bitmap format ewah: compressed bitmap implementation ...
Diffstat (limited to 'pack-revindex.h')
-rw-r--r--pack-revindex.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/pack-revindex.h b/pack-revindex.h
index 8d5027ad91..d737f98965 100644
--- a/pack-revindex.h
+++ b/pack-revindex.h
@@ -6,7 +6,14 @@ struct revindex_entry {
unsigned int nr;
};
+struct pack_revindex {
+ struct packed_git *p;
+ struct revindex_entry *revindex;
+};
+
+struct pack_revindex *revindex_for_pack(struct packed_git *p);
+int find_revindex_position(struct pack_revindex *pridx, off_t ofs);
+
struct revindex_entry *find_pack_revindex(struct packed_git *p, off_t ofs);
-void discard_revindex(void);
#endif