Skip to content

Commit f1d8130

Browse files
jonathantanmygitster
authored andcommitted
pack: move clear_delta_base_cache(), packed_object_info(), unpack_entry()
Both sha1_file.c and packfile.c now need read_object(), so a copy of read_object() was created in packfile.c. This patch makes both mark_bad_packed_object() and has_packed_and_bad() global. Unlike most of the other patches in this series, these 2 functions need to remain global. Signed-off-by: Jonathan Tan <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 3588dd6 commit f1d8130

File tree

4 files changed

+685
-670
lines changed

4 files changed

+685
-670
lines changed

cache.h

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1187,9 +1187,6 @@ extern void *map_sha1_file(const unsigned char *sha1, unsigned long *size);
11871187
extern int unpack_sha1_header(git_zstream *stream, unsigned char *map, unsigned long mapsize, void *buffer, unsigned long bufsiz);
11881188
extern int parse_sha1_header(const char *hdr, unsigned long *sizep);
11891189

1190-
/* global flag to enable extra checks when accessing packed objects */
1191-
extern int do_check_packed_object_crc;
1192-
11931190
extern int check_sha1_signature(const unsigned char *sha1, void *buf, unsigned long size, const char *type);
11941191

11951192
extern int finalize_object_file(const char *tmpfile, const char *filename);
@@ -1623,8 +1620,6 @@ extern int odb_mkstemp(struct strbuf *template, const char *pattern);
16231620
*/
16241621
extern int odb_pack_keep(const char *name);
16251622

1626-
extern void clear_delta_base_cache(void);
1627-
16281623
/*
16291624
* Make sure that a pointer access into an mmap'd index file is within bounds,
16301625
* and can provide at least 8 bytes of data.
@@ -1662,7 +1657,6 @@ extern off_t nth_packed_object_offset(const struct packed_git *, uint32_t n);
16621657
extern off_t find_pack_entry_one(const unsigned char *sha1, struct packed_git *);
16631658

16641659
extern int is_pack_valid(struct packed_git *);
1665-
extern void *unpack_entry(struct packed_git *, off_t, enum object_type *, unsigned long *);
16661660

16671661
/*
16681662
* Iterate over the files in the loose-object parts of the object
@@ -1773,7 +1767,6 @@ struct object_info {
17731767
/* Do not retry packed storage after checking packed and loose storage */
17741768
#define OBJECT_INFO_QUICK 8
17751769
extern int sha1_object_info_extended(const unsigned char *, struct object_info *, unsigned flags);
1776-
extern int packed_object_info(struct packed_git *pack, off_t offset, struct object_info *);
17771770

17781771
/* Dumb servers support */
17791772
extern int update_server_info(int);

0 commit comments

Comments
 (0)