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

Function hasevery

kwset.c:392–407  ·  view source on GitHub ↗

Return true if A has every label in B. */

Source from the content-addressed store, hash-verified

390
391/* Return true if A has every label in B. */
392static int
393hasevery (register struct tree const *a, register struct tree const *b)
394{
395 if (!b)
396 return 1;
397 if (!hasevery(a, b->llink))
398 return 0;
399 if (!hasevery(a, b->rlink))
400 return 0;
401 while (a && b->label != a->label)
402 if (b->label < a->label)
403 a = a->llink;
404 else
405 a = a->rlink;
406 return !!a;
407}
408
409/* Compute a vector, indexed by character code, of the trie nodes
410 referenced from the given tree. */

Callers 1

kwsprepFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected