MCPcopy Create free account
hub / github.com/git/git / odb_read_object_info

Function odb_read_object_info

odb.c:717–730  ·  view source on GitHub ↗

returns enum object_type or negative */

Source from the content-addressed store, hash-verified

715
716/* returns enum object_type or negative */
717int odb_read_object_info(struct object_database *odb,
718 const struct object_id *oid,
719 size_t *sizep)
720{
721 enum object_type type;
722 struct object_info oi = OBJECT_INFO_INIT;
723
724 oi.typep = &type;
725 oi.sizep = sizep;
726 if (odb_read_object_info_extended(odb, oid, &oi,
727 OBJECT_INFO_LOOKUP_REPLACE) < 0)
728 return -1;
729 return type;
730}
731
732int odb_pretend_object(struct object_database *odb,
733 void *buf, size_t len, enum object_type type,

Callers 15

gpg_verify_tagFunction · 0.85
check_has_commitFunction · 0.85
commit_missing_in_subFunction · 0.85
verify_working_tree_pathFunction · 0.85
fill_blob_sha1_and_modeFunction · 0.85
add_ref_to_setFunction · 0.85
write_archive_entryFunction · 0.85
retry_bad_packed_offsetFunction · 0.85
sequencer_pick_revisionsFunction · 0.85
add_missing_tagsFunction · 0.85
peel_object_extFunction · 0.85

Calls 1

Tested by

no test coverage detected