https://github.com/git/git
Revision c3ebe91b40c23a1b70dba36383a23016711d8bc0 authored by Junio C Hamano on 31 May 2024, 00:25:37 UTC, committed by Junio C Hamano on 31 May 2024, 00:25:37 UTC
2 parent s 58bac47 + bea9ecd
Raw File
Tip revision: c3ebe91b40c23a1b70dba36383a23016711d8bc0 authored by Junio C Hamano on 31 May 2024, 00:25:37 UTC
Sync with Git 2.45.2
Tip revision: c3ebe91
blob.c
#include "git-compat-util.h"
#include "blob.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