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

Function match_order

diffcore-order.c:58–77  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

56}
57
58static int match_order(const char *path)
59{
60 int i;
61 static struct strbuf p = STRBUF_INIT;
62
63 for (i = 0; i < order_cnt; i++) {
64 strbuf_reset(&p);
65 strbuf_addstr(&p, path);
66 while (p.buf[0]) {
67 char *cp;
68 if (!wildmatch(order[i], p.buf, 0))
69 return i;
70 cp = strrchr(p.buf, '/');
71 if (!cp)
72 break;
73 *cp = 0;
74 }
75 }
76 return order_cnt;
77}
78
79static int compare_objs_order(const void *a_, const void *b_)
80{

Callers 1

order_objectsFunction · 0.85

Calls 2

strbuf_addstrFunction · 0.85
wildmatchFunction · 0.85

Tested by

no test coverage detected