MCPcopy Index your code
hub / github.com/git/git / try_explicit_object_name

Function try_explicit_object_name

remote.c:1112–1131  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1110}
1111
1112static int try_explicit_object_name(const char *name,
1113 struct ref **match)
1114{
1115 struct object_id oid;
1116
1117 if (!*name) {
1118 if (match)
1119 *match = alloc_delete_ref();
1120 return 0;
1121 }
1122
1123 if (repo_get_oid(the_repository, name, &oid))
1124 return -1;
1125
1126 if (match) {
1127 *match = alloc_ref(name);
1128 oidcpy(&(*match)->new_oid, &oid);
1129 }
1130 return 0;
1131}
1132
1133static struct ref *make_linked_ref(const char *name, struct ref ***tail)
1134{

Callers 1

match_explicit_lhsFunction · 0.85

Calls 4

alloc_delete_refFunction · 0.85
repo_get_oidFunction · 0.85
alloc_refFunction · 0.85
oidcpyFunction · 0.85

Tested by

no test coverage detected