summaryrefslogtreecommitdiff
path: root/blob.c
diff options
context:
space:
mode:
authorDaniel Barkalow <barkalow@iabervon.org>2010-01-18 13:06:28 -0500
committerJunio C Hamano <gitster@pobox.com>2010-01-18 17:04:02 -0800
commit837d395a5c0b98ab938d71db8e2b6b9f69ddcc4d (patch)
tree485fd6f9f5847d8d63d20e865e8d4ad287341001 /blob.c
parent64161a6b23920c96485131fb51d82d8ca13b4e1d (diff)
downloadgit-837d395a5c0b98ab938d71db8e2b6b9f69ddcc4d.tar.gz
Replace parse_blob() with an explanatory comment
parse_blob() has never actually been used; it has served simply to avoid having a confusing gap in the API. Instead of leaving it, put in a comment that explains what "parsing a blob" entails (making sure the object is actually readable), and why code might care whether a blob has been parsed or not. Signed-off-by: Daniel Barkalow <barkalow@iabervon.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'blob.c')
-rw-r--r--blob.c21
1 files changed, 0 insertions, 21 deletions
diff --git a/blob.c b/blob.c
index bd7d078e1a..ae320bd8fa 100644
--- a/blob.c
+++ b/blob.c
@@ -23,24 +23,3 @@ int parse_blob_buffer(struct blob *item, void *buffer, unsigned long size)
item->object.parsed = 1;
return 0;
}
-
-int parse_blob(struct blob *item)
-{
- enum object_type type;
- void *buffer;
- unsigned long size;
- int ret;
-
- if (item->object.parsed)
- return 0;
- buffer = read_sha1_file(item->object.sha1, &type, &size);
- if (!buffer)
- return error("Could not read %s",
- sha1_to_hex(item->object.sha1));
- if (type != OBJ_BLOB)
- return error("Object %s not a blob",
- sha1_to_hex(item->object.sha1));
- ret = parse_blob_buffer(item, buffer, size);
- free(buffer);
- return ret;
-}