https://github.com/git/git
Raw File
Tip revision: 53ef17d3ee0f7fcb151f428ee3bd736b8046825f authored by Johannes Schindelin on 17 March 2022, 09:58:00 UTC
Git 2.35.2
Tip revision: 53ef17d
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);
}

int parse_blob_buffer(struct blob *item, void *buffer, unsigned long size)
{
	item->object.parsed = 1;
	return 0;
}
back to top