diff options
author | Junio C Hamano <junkio@cox.net> | 2005-06-28 14:56:57 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-06-28 15:16:25 -0700 |
commit | 9a217f2a725b085982e57b2a900d46128713cb27 (patch) | |
tree | 7a8e6944274ba9653b56e523aa6c5b185e46f051 /cache.h | |
parent | d22b9290ab6de119d03154844910ae5d963b5f1f (diff) | |
download | git-9a217f2a725b085982e57b2a900d46128713cb27.tar.gz git-9a217f2a725b085982e57b2a900d46128713cb27.tar.xz |
[PATCH] Expose packed_git and alt_odb.
The commands git-fsck-cache and probably git-*-pull needs to have a way
to enumerate objects contained in packed GIT archives and alternate
object pools. This commit exposes the data structure used to keep track
of them from sha1_file.c, and adds a couple of accessor interface
functions for use by the enhanced git-fsck-cache command.
Signed-off-by: Junio C Hamano <junkio@cox.net>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'cache.h')
-rw-r--r-- | cache.h | 19 |
1 files changed, 19 insertions, 0 deletions
@@ -233,4 +233,23 @@ struct checkout { extern int checkout_entry(struct cache_entry *ce, struct checkout *state); +extern struct alternate_object_database { + char *base; + char *name; +} *alt_odb; +extern void prepare_alt_odb(void); + +extern struct packed_git { + struct packed_git *next; + unsigned long index_size; + unsigned long pack_size; + unsigned int *index_base; + void *pack_base; + unsigned int pack_last_used; + char pack_name[0]; /* something like ".git/objects/pack/xxxxx.pack" */ +} *packed_git; +extern void prepare_packed_git(void); +extern int num_packed_objects(const struct packed_git *p); +extern int nth_packed_object_sha1(const struct packed_git *, int, unsigned char*); + #endif /* CACHE_H */ |