summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 3bfaf01)
raw | patch | inline | side by side (parent: 3bfaf01)
author | Junio C Hamano <gitster@pobox.com> | |
Tue, 17 Jun 2008 05:19:00 +0000 (22:19 -0700) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Tue, 17 Jun 2008 05:19:00 +0000 (22:19 -0700) |
It was implemented as a thin wrapper around an otherwise unused
helper function parse_pack_index_file(). The code becomes simpler
and easier to read by consolidating the two.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
helper function parse_pack_index_file(). The code becomes simpler
and easier to read by consolidating the two.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
cache.h | patch | blob | history | |
sha1_file.c | patch | blob | history |
index 23f3b923350669001fffdc8c670825bdaefa7f3c..81b7e17de26ae33249c60b101f5718cb5c5e5699 100644 (file)
--- a/cache.h
+++ b/cache.h
@@ -694,8 +694,6 @@ extern struct ref **get_remote_heads(int in, struct ref **list, int nr_match, ch
extern int server_supports(const char *feature);
extern struct packed_git *parse_pack_index(unsigned char *sha1);
-extern struct packed_git *parse_pack_index_file(const unsigned char *sha1,
- const char *idx_path);
extern void prepare_packed_git(void);
extern void reprepare_packed_git(void);
diff --git a/sha1_file.c b/sha1_file.c
index e300562c158295e338e60e05ad02fa1a53c7a0a1..191f814e09ee6067edf7b0acc73a04751e73a6da 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(const unsigned char *sha1,
- const char *idx_path)
-{
+ const char *idx_path = sha1_pack_index_name(sha1);
const char *path = sha1_pack_name(sha1);
struct packed_git *p = xmalloc(sizeof(*p) + strlen(path) + 2);