]> git.ipfire.org Git - thirdparty/git.git/blame - blob.c
gitweb: correctly store previous rev in javascript-actions mode
[thirdparty/git.git] / blob.c
CommitLineData
175785e5 1#include "cache.h"
8f1d2e6f 2#include "blob.h"
68f95d38 3#include "repository.h"
14ba97f8 4#include "alloc.h"
175785e5
DB
5
6const char *blob_type = "blob";
7
17126cdf 8struct blob *lookup_blob(struct repository *r, const struct object_id *oid)
175785e5 9{
d0229abd 10 struct object *obj = lookup_object(r, oid);
100c5f3b 11 if (!obj)
a378509e 12 return create_object(r, oid, alloc_blob_node(r));
17126cdf 13 return object_as_type(r, obj, OBJ_BLOB, 0);
175785e5 14}
a510bfaa 15
bd2c39f5
NP
16int parse_blob_buffer(struct blob *item, void *buffer, unsigned long size)
17{
18 item->object.parsed = 1;
19 return 0;
20}