summaryrefslogtreecommitdiff
path: root/pack.h
diff options
context:
space:
mode:
authorGeert Bosch <bosch@gnat.com>2007-06-01 15:18:05 -0400
committerJunio C Hamano <junkio@cox.net>2007-06-02 13:14:18 -0700
commitaa7e44bf571717aeb4435e6605391d51f3117047 (patch)
treeb6ba0f10794a3001e93fb630c94922570797616e /pack.h
parent4bc708347e2b94564d9ec5e0e3a2ab0e3d6b2fd9 (diff)
downloadgit-aa7e44bf571717aeb4435e6605391d51f3117047.tar.gz
Unify write_index_file functions
This patch unifies the write_index_file functions in builtin-pack-objects.c and index-pack.c. As the name "index" is overloaded in git, move in the direction of using "idx" and "pack idx" when refering to the pack index. There should be no change in functionality. Signed-off-by: Geert Bosch <bosch@gnat.com> Acked-by: Nicolas Pitre <nico@cam.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'pack.h')
-rw-r--r--pack.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/pack.h b/pack.h
index d667fb8d5a..f357c9f428 100644
--- a/pack.h
+++ b/pack.h
@@ -34,6 +34,10 @@ struct pack_header {
*/
#define PACK_IDX_SIGNATURE 0xff744f63 /* "\377tOc" */
+/* These may be overridden by command-line parameters */
+extern uint32_t pack_idx_default_version;
+extern uint32_t pack_idx_off32_limit;
+
/*
* Packed object index header
*/
@@ -42,6 +46,16 @@ struct pack_idx_header {
uint32_t idx_version;
};
+/*
+ * Common part of object structure used for write_idx_file
+ */
+struct pack_idx_entry {
+ unsigned char sha1[20];
+ uint32_t crc32;
+ off_t offset;
+};
+
+extern const char *write_idx_file(const char *index_name, struct pack_idx_entry **objects, int nr_objects, unsigned char *sha1);
extern int verify_pack(struct packed_git *, int);
extern void fixup_pack_header_footer(int, unsigned char *, const char *, uint32_t);