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

Function cmp_packed_refname

refs/packed-backend.c:309–323  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

307
308
309static int cmp_packed_refname(const char *r1, const char *r2)
310{
311 while (1) {
312 if (*r1 == '\n')
313 return *r2 == '\n' ? 0 : -1;
314 if (*r1 != *r2) {
315 if (*r2 == '\n')
316 return 1;
317 else
318 return (unsigned char)*r1 < (unsigned char)*r2 ? -1 : +1;
319 }
320 r1++;
321 r2++;
322 }
323}
324
325static int cmp_packed_ref_records(const void *v1, const void *v2,
326 void *cb_data)

Callers 2

cmp_packed_ref_recordsFunction · 0.85
packed_fsck_ref_sortedFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected