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

Function repo_resolve_gitlink_ref

refs.c:2283–2298  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2281}
2282
2283int repo_resolve_gitlink_ref(struct repository *r,
2284 const char *submodule, const char *refname,
2285 struct object_id *oid)
2286{
2287 struct ref_store *refs;
2288 int flags;
2289
2290 refs = repo_get_submodule_ref_store(r, submodule);
2291 if (!refs)
2292 return -1;
2293
2294 if (!refs_resolve_ref_unsafe(refs, refname, 0, oid, &flags) ||
2295 is_null_oid(oid))
2296 return -1;
2297 return 0;
2298}
2299
2300/*
2301 * Look up a ref store by name. If that ref_store hasn't been

Callers 10

index_pathFunction · 0.85
show_patch_diffFunction · 0.85
remove_dir_recurseFunction · 0.85
check_removedFunction · 0.85
builtin_object_mode_attrFunction · 0.85
ce_compare_gitlinkFunction · 0.85
update_submoduleFunction · 0.85
process_directoryFunction · 0.85

Calls 3

refs_resolve_ref_unsafeFunction · 0.85
is_null_oidFunction · 0.85

Tested by

no test coverage detected