]> git.ipfire.org Git - thirdparty/git.git/blob - blob.c
Merge branch 'jc/diff-exit-code-with-w-fixes' into maint-2.42
[thirdparty/git.git] / blob.c
1 #include "git-compat-util.h"
2 #include "blob.h"
3 #include "repository.h"
4 #include "alloc.h"
5
6 const char *blob_type = "blob";
7
8 struct blob *lookup_blob(struct repository *r, const struct object_id *oid)
9 {
10 struct object *obj = lookup_object(r, oid);
11 if (!obj)
12 return create_object(r, oid, alloc_blob_node(r));
13 return object_as_type(obj, OBJ_BLOB, 0);
14 }
15
16 void parse_blob_buffer(struct blob *item)
17 {
18 item->object.parsed = 1;
19 }