| 1775 | } |
| 1776 | |
| 1777 | static void gc_edge(gc_t *g, const gc_site_t *s, const gc_chart_t *hit, const char *chart, |
| 1778 | const char *root) { |
| 1779 | char esc[CBM_SZ_1K]; |
| 1780 | char resc[CBM_SZ_512]; |
| 1781 | char props[CBM_SZ_2K]; |
| 1782 | cbm_json_escape(esc, (int)sizeof(esc), chart); |
| 1783 | cbm_json_escape(resc, (int)sizeof(resc), root ? root : ""); |
| 1784 | snprintf(props, sizeof(props), "{\"via\":\"helm-sdk\",\"chart\":\"%s\"%s%s%s,\"line\":%d}", esc, |
| 1785 | root ? ",\"root\":\"" : "", root ? resc : "", root ? "\"" : "", s->line); |
| 1786 | cbm_gbuf_insert_edge(g->ctx->gbuf, s->fn, hit->id, "DEPLOYS", props); |
| 1787 | g->edges++; |
| 1788 | } |
| 1789 | |
| 1790 | /* The repository dir a chart load's unknown root stood for: the matched |
| 1791 | * chart directory without the tail. */ |
no test coverage detected