aboutsummaryrefslogtreecommitdiff
path: root/cache.h
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2008-11-12 22:26:35 -0800
committerJunio C Hamano <gitster@pobox.com>2008-11-12 22:26:35 -0800
commit7b51b77dbc71e83789f59f0cd559489115478f27 (patch)
treead480b1a976d0670c0209333134eb1444c5be8b9 /cache.h
parent3fdd37fe1520765d1d207737ab65415e3d2ca174 (diff)
parenta2d2c478f325690e1575e14e7d310fd7435d83be (diff)
downloadgit-7b51b77dbc71e83789f59f0cd559489115478f27.tar.gz
git-7b51b77dbc71e83789f59f0cd559489115478f27.tar.xz
Merge branch 'np/pack-safer'
* np/pack-safer: t5303: fix printf format string for portability t5303: work around printf breakage in dash pack-objects: don't leak pack window reference when splitting packs extend test coverage for latest pack corruption resilience improvements pack-objects: allow "fixing" a corrupted pack without a full repack make find_pack_revindex() aware of the nasty world make check_object() resilient to pack corruptions make packed_object_info() resilient to pack corruptions make unpack_object_header() non fatal better validation on delta base object offsets close another possibility for propagating pack corruption
Diffstat (limited to 'cache.h')
-rw-r--r--cache.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/cache.h b/cache.h
index c776f2f5a..3b5f0c4c0 100644
--- a/cache.h
+++ b/cache.h
@@ -574,6 +574,9 @@ extern int force_object_loose(const unsigned char *sha1, time_t mtime);
/* just like read_sha1_file(), but non fatal in presence of bad objects */
extern void *read_object(const unsigned char *sha1, enum object_type *type, unsigned long *size);
+/* global flag to enable extra checks when accessing packed objects */
+extern int do_check_packed_object_crc;
+
extern int check_sha1_signature(const unsigned char *sha1, void *buf, unsigned long size, const char *type);
extern int move_temp_to_file(const char *tmpfile, const char *filename);
@@ -762,7 +765,7 @@ extern const unsigned char *nth_packed_object_sha1(struct packed_git *, uint32_t
extern off_t nth_packed_object_offset(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 unpack_object_header_buffer(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 *);
extern int matches_pack_name(struct packed_git *p, const char *name);