diff options
author | Shawn O. Pearce <spearce@spearce.org> | 2010-04-19 18:23:08 +0400 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2010-04-20 04:56:17 +0400 |
commit | 7b64469a363c10e9e875a73d32a220ba48694a28 (patch) | |
tree | 66c7dccc1f4366b74c592ce27fa45cb1e51be702 /cache.h | |
parent | 9b0aa728705439ca4b4e7ec845f79f8487059320 (diff) |
Allow parse_pack_index on temporary files
The easiest way to verify a pack index is to open it through the
standard parse_pack_index function, permitting the header check
to happen when the file is mapped. However, the dumb HTTP client
needs to verify a pack index before its moved into its proper file
name within the objects/pack directory, to prevent a corrupt index
from being made available. So permit the caller to specify the
exact path of the index file.
For now we're still using the final destination name within the
sole call site in http.c, but eventually we will start to parse
the temporary path instead.
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'cache.h')
-rw-r--r-- | cache.h | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -900,7 +900,7 @@ struct extra_have_objects { extern struct ref **get_remote_heads(int in, struct ref **list, int nr_match, char **match, unsigned int flags, struct extra_have_objects *); extern int server_supports(const char *feature); -extern struct packed_git *parse_pack_index(unsigned char *sha1); +extern struct packed_git *parse_pack_index(unsigned char *sha1, const char *idx_path); extern void prepare_packed_git(void); extern void reprepare_packed_git(void); |