summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: abc776f)
raw | patch | inline | side by side (parent: abc776f)
author | Christian Couder <chriscool@tuxfamily.org> | |
Mon, 12 Jan 2009 17:42:24 +0000 (18:42 +0100) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Tue, 13 Jan 2009 08:14:55 +0000 (00:14 -0800) |
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>
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>
cache.h | patch | blob | history | |
sha1_file.c | patch | blob | history |
index 231c06d7726b575f6e522d5b0c0fe43557e8c651..8e1af2669bd2e9af03a73b7058bec014d4d3a3aa 100644 (file)
--- a/cache.h
+++ b/cache.h
@@ -631,9 +631,6 @@ extern int write_sha1_file(void *buf, unsigned long len, const char *type, unsig
extern int pretend_sha1_file(void *, unsigned long, enum object_type, unsigned char *);
extern int force_object_loose(const unsigned char *sha1, time_t mtime);
-/* just like read_sha1_file(), but non fatal in presence of bad objects */
-extern void *read_object(const unsigned char *sha1, enum object_type *type, unsigned long *size);
-
/* global flag to enable extra checks when accessing packed objects */
extern int do_check_packed_object_crc;
diff --git a/sha1_file.c b/sha1_file.c
index 52d1ead15b4db62138d9cedd5fe04068bcd10461..f08493f039fa28c90e3edc708bbcf0a527e4f659 100644 (file)
--- a/sha1_file.c
+++ b/sha1_file.c
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,
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;