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

Function cmd_resolve_ref

t/helper/test-ref-store.c:184–196  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

182}
183
184static int cmd_resolve_ref(struct ref_store *refs, const char **argv)
185{
186 struct object_id oid = *null_oid(the_hash_algo);
187 const char *refname = notnull(*argv++, "refname");
188 int resolve_flags = arg_flags(*argv++, "resolve-flags", empty_flags);
189 int flags;
190 const char *ref;
191
192 ref = refs_resolve_ref_unsafe(refs, refname, resolve_flags,
193 &oid, &flags);
194 printf("%s %s 0x%x\n", oid_to_hex(&oid), ref ? ref : "(null)", flags);
195 return ref ? 0 : 1;
196}
197
198static int cmd_verify_ref(struct ref_store *refs, const char **argv)
199{

Callers

nothing calls this directly

Calls 5

null_oidFunction · 0.85
notnullFunction · 0.85
arg_flagsFunction · 0.85
refs_resolve_ref_unsafeFunction · 0.85
oid_to_hexFunction · 0.85

Tested by

no test coverage detected