MCPcopy Index your code
hub / github.com/git/git / parse_reference_uri

Function parse_reference_uri

setup.c:637–650  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

635}
636
637static void parse_reference_uri(const char *value, char **format,
638 char **payload)
639{
640 const char *schema_end;
641
642 schema_end = strstr(value, "://");
643 if (!schema_end) {
644 *format = xstrdup(value);
645 *payload = NULL;
646 } else {
647 *format = xstrndup(value, schema_end - value);
648 *payload = xstrdup_or_null(schema_end + 3);
649 }
650}
651
652/*
653 * Record any new extensions in this function.

Callers 3

handle_extensionFunction · 0.85

Calls 3

xstrdupFunction · 0.85
xstrndupFunction · 0.85
xstrdup_or_nullFunction · 0.85

Tested by

no test coverage detected