summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: b092133)
raw | patch | inline | side by side (parent: b092133)
author | Daniel Barkalow <barkalow@iabervon.org> | |
Tue, 16 Aug 2005 04:10:03 +0000 (00:10 -0400) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Tue, 16 Aug 2005 19:09:33 +0000 (12:09 -0700) |
Note that the pack file has to be in the usual location if it gets
installed later.
Signed-off-by: Daniel Barkalow <barkalow@iabervon.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
installed later.
Signed-off-by: Daniel Barkalow <barkalow@iabervon.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
cache.h | patch | blob | history | |
sha1_file.c | patch | blob | history |
index dbde95a0b687fcc528aa32629bbf6f4d4ba488df..f14a4ce91aa83c0ed853c6d9fd9a7b6bc2cc12db 100644 (file)
--- a/cache.h
+++ b/cache.h
extern struct ref **get_remote_heads(int in, struct ref **list, int nr_match, char **match);
extern struct packed_git *parse_pack_index(unsigned char *sha1);
+extern struct packed_git *parse_pack_index_file(unsigned char *sha1,
+ char *idx_path);
extern void prepare_packed_git(void);
extern void install_packed_git(struct packed_git *pack);
diff --git a/sha1_file.c b/sha1_file.c
index 2d109f928bef6fe74f2a27af1419d9e82a7b9b33..b6ebbc5c9a29438f365478bced6845bf78854ee2 100644 (file)
--- a/sha1_file.c
+++ b/sha1_file.c
}
struct packed_git *parse_pack_index(unsigned char *sha1)
+{
+ char *path = sha1_pack_index_name(sha1);
+ return parse_pack_index_file(sha1, path);
+}
+
+struct packed_git *parse_pack_index_file(unsigned char *sha1, char *idx_path)
{
struct packed_git *p;
unsigned long idx_size;
void *idx_map;
- char *path = sha1_pack_index_name(sha1);
+ char *path;
- if (check_packed_git_idx(path, &idx_size, &idx_map))
+ if (check_packed_git_idx(idx_path, &idx_size, &idx_map))
return NULL;
path = sha1_pack_name(sha1);