summaryrefslogtreecommitdiff
path: root/cache.h
diff options
context:
space:
mode:
authorJunio C Hamano <junkio@cox.net>2007-04-22 00:20:50 (GMT)
committerJunio C Hamano <junkio@cox.net>2007-04-22 00:20:50 (GMT)
commit99ebd06c18fdb7f8274db6cca456a95942916bb6 (patch)
tree27617e00fe522a5d85971d833e1db228d7efe2f8 /cache.h
parente32442a6767cb530f882f409d1d665d14bf9b7d9 (diff)
parentbe18c1fe1291ed839aef817283a880e09e222be5 (diff)
downloadgit-99ebd06c18fdb7f8274db6cca456a95942916bb6.zip
git-99ebd06c18fdb7f8274db6cca456a95942916bb6.tar.gz
git-99ebd06c18fdb7f8274db6cca456a95942916bb6.tar.bz2
Merge branch 'np/pack'
* np/pack: (27 commits) document --index-version for index-pack and pack-objects pack-objects: remove obsolete comments pack-objects: better check_object() performances add get_size_from_delta() pack-objects: make in_pack_header_size a variable of its own pack-objects: get rid of create_final_object_list() pack-objects: get rid of reuse_cached_pack pack-objects: clean up list sorting pack-objects: rework check_delta_limit usage pack-objects: equal objects in size should delta against newer objects pack-objects: optimize preferred base handling a bit clean up add_object_entry() tests for various pack index features use test-genrandom in tests instead of /dev/urandom simple random data generator for tests validate reused pack data with CRC when possible allow forcing index v2 and 64-bit offset treshold pack-redundant.c: learn about index v2 show-index.c: learn about index v2 sha1_file.c: learn about index version 2 ...
Diffstat (limited to 'cache.h')
-rw-r--r--cache.h9
1 files changed, 5 insertions, 4 deletions
diff --git a/cache.h b/cache.h
index 53c2341..ead1196 100644
--- a/cache.h
+++ b/cache.h
@@ -376,11 +376,12 @@ struct pack_window {
extern struct packed_git {
struct packed_git *next;
struct pack_window *windows;
- const void *index_data;
- off_t index_size;
off_t pack_size;
- time_t mtime;
+ const void *index_data;
+ size_t index_size;
+ uint32_t num_objects;
int index_version;
+ time_t mtime;
int pack_fd;
int pack_local;
unsigned char sha1[20];
@@ -431,11 +432,11 @@ extern void pack_report(void);
extern unsigned char* use_pack(struct packed_git *, struct pack_window **, off_t, unsigned int *);
extern void unuse_pack(struct pack_window **);
extern struct packed_git *add_packed_git(const char *, int, int);
-extern uint32_t num_packed_objects(const struct packed_git *p);
extern const unsigned char *nth_packed_object_sha1(const struct packed_git *, uint32_t);
extern off_t find_pack_entry_one(const unsigned char *, struct packed_git *);
extern void *unpack_entry(struct packed_git *, off_t, enum object_type *, unsigned long *);
extern unsigned long unpack_object_header_gently(const unsigned char *buf, unsigned long len, enum object_type *type, unsigned long *sizep);
+extern unsigned long get_size_from_delta(struct packed_git *, struct pack_window **, off_t);
extern const char *packed_object_info_detail(struct packed_git *, off_t, unsigned long *, unsigned long *, unsigned int *, unsigned char *);
/* Dumb servers support */