https://github.com/git/git
Raw File
Tip revision: b9b439e0e3a543ddb920e4cf8d3c9d53f730111f authored by Johannes Schindelin on 10 April 2024, 18:56:02 UTC
Git 2.40.2
Tip revision: b9b439e
blob.c
#include "cache.h"
#include "blob.h"
#include "repository.h"
#include "alloc.h"

const char *blob_type = "blob";

struct blob *lookup_blob(struct repository *r, const struct object_id *oid)
{
	struct object *obj = lookup_object(r, oid);
	if (!obj)
		return create_object(r, oid, alloc_blob_node(r));
	return object_as_type(obj, OBJ_BLOB, 0);
}

void parse_blob_buffer(struct blob *item)
{
	item->object.parsed = 1;
}
back to top