summaryrefslogtreecommitdiff
path: root/sha1_file.c
diff options
context:
space:
mode:
authorChristian Couder <chriscool@tuxfamily.org>2009-01-12 17:42:24 (GMT)
committerJunio C Hamano <gitster@pobox.com>2009-01-13 08:14:55 (GMT)
commitc2c5b27051babdc2a7503d5b9d695b4c7b45c14b (patch)
tree5905babfa50934008673f9699387069e908065e3 /sha1_file.c
parentabc776f7880c2dc0a4179420366e40ecb99d223f (diff)
downloadgit-c2c5b27051babdc2a7503d5b9d695b4c7b45c14b.zip
git-c2c5b27051babdc2a7503d5b9d695b4c7b45c14b.tar.gz
git-c2c5b27051babdc2a7503d5b9d695b4c7b45c14b.tar.bz2
sha1_file: make "read_object" static
This function is only used from "sha1_file.c". And as we want to add a "replace_object" hook in "read_sha1_file", we must not let people bypass the hook using something other than "read_sha1_file". Signed-off-by: Christian Couder <chriscool@tuxfamily.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'sha1_file.c')
-rw-r--r--sha1_file.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/sha1_file.c b/sha1_file.c
index 52d1ead..f08493f 100644
--- a/sha1_file.c
+++ b/sha1_file.c
@@ -1700,6 +1700,9 @@ static void add_delta_base_cache(struct packed_git *p, off_t base_offset,
delta_base_cache_lru.prev = &ent->lru;
}
+static void *read_object(const unsigned char *sha1, enum object_type *type,
+ unsigned long *size);
+
static void *unpack_delta_entry(struct packed_git *p,
struct pack_window **w_curs,
off_t curpos,
@@ -2130,8 +2133,8 @@ int pretend_sha1_file(void *buf, unsigned long len, enum object_type type,
return 0;
}
-void *read_object(const unsigned char *sha1, enum object_type *type,
- unsigned long *size)
+static void *read_object(const unsigned char *sha1, enum object_type *type,
+ unsigned long *size)
{
unsigned long mapsize;
void *map, *buf;