aboutsummaryrefslogtreecommitdiff
path: root/sha1_file.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2008-06-16 22:19:00 -0700
committerJunio C Hamano <gitster@pobox.com>2008-06-16 22:19:00 -0700
commit79c6dca413094d2df74e7050f1185963b00e9245 (patch)
tree04e1aeabd72c3732b55a3bea74f561f068e8845f /sha1_file.c
parent3bfaf01857ebcefbd38529a73b059dc984ecb5a4 (diff)
downloadgit-79c6dca413094d2df74e7050f1185963b00e9245.tar.gz
git-79c6dca413094d2df74e7050f1185963b00e9245.tar.xz
sha1_file.c: simplify parse_pack_index()
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>
Diffstat (limited to 'sha1_file.c')
-rw-r--r--sha1_file.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/sha1_file.c b/sha1_file.c
index e300562c1..191f814e0 100644
--- a/sha1_file.c
+++ b/sha1_file.c
@@ -831,13 +831,7 @@ struct packed_git *add_packed_git(const char *path, int path_len, int local)
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);