MCPcopy Create free account
hub / github.com/DeusData/codebase-memory-mcp / dk_hub_ref

Function dk_hub_ref

src/pipeline/pass_docker.c:1892–1899  ·  view source on GitHub ↗

Is an edge of `type` with properties `p` a reference to an image -- * USAGE {ref:image}, or DEPENDS_ON {via:from|copy-from}? */

Source from the content-addressed store, hash-verified

1890/* Is an edge of `type` with properties `p` a reference to an image --
1891 * USAGE {ref:image}, or DEPENDS_ON {via:from|copy-from}? */
1892static bool dk_hub_ref(const char *type, const char *p) {
1893 char v[CBM_SZ_32];
1894 if (strcmp(type, "USAGE") == 0) {
1895 return dk_prop(p, "ref", v, sizeof(v)) && strcmp(v, "image") == 0;
1896 }
1897 return dk_prop(p, "via", v, sizeof(v)) &&
1898 (strcmp(v, "from") == 0 || strcmp(v, "copy-from") == 0);
1899}
1900
1901/* The edges of Image `img`: build edges out (DEPENDS_ON {via:build}) and
1902 * references in, each with the tag of its `image` reference. */

Callers 1

dk_hub_collectFunction · 0.85

Calls 1

dk_propFunction · 0.85

Tested by

no test coverage detected