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

Function list_refs

bundle.c:176–198  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

174}
175
176static int list_refs(struct string_list *r, int argc, const char **argv)
177{
178 int i;
179
180 for (i = 0; i < r->nr; i++) {
181 struct object_id *oid;
182 const char *name;
183
184 if (argc > 1) {
185 int j;
186 for (j = 1; j < argc; j++)
187 if (!strcmp(r->items[i].string, argv[j]))
188 break;
189 if (j == argc)
190 continue;
191 }
192
193 oid = r->items[i].util;
194 name = r->items[i].string;
195 printf("%s %s\n", oid_to_hex(oid), name);
196 }
197 return 0;
198}
199
200/* Remember to update object flag allocation in object.h */
201#define PREREQ_MARK (1u<<16)

Callers 2

verify_bundleFunction · 0.85
list_bundle_refsFunction · 0.85

Calls 1

oid_to_hexFunction · 0.85

Tested by

no test coverage detected