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

Function output_refs

remote-curl.c:591–609  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

589}
590
591static void output_refs(struct ref *refs)
592{
593 struct ref *posn;
594 if (options.object_format && options.hash_algo) {
595 printf(":object-format %s\n", options.hash_algo->name);
596 repo_set_hash_algo(the_repository,
597 hash_algo_by_ptr(options.hash_algo));
598 }
599 for (posn = refs; posn; posn = posn->next) {
600 if (posn->symref)
601 printf("@%s %s\n", posn->symref, posn->name);
602 else
603 printf("%s %s\n", hash_to_hex_algop(posn->old_oid.hash,
604 options.hash_algo),
605 posn->name);
606 }
607 printf("\n");
608 fflush(stdout);
609}
610
611struct rpc_state {
612 const char *service_name;

Callers 1

cmd_mainFunction · 0.85

Calls 3

repo_set_hash_algoFunction · 0.85
hash_algo_by_ptrFunction · 0.85
hash_to_hex_algopFunction · 0.85

Tested by

no test coverage detected