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

Function parse_next_refname

builtin/update-ref.c:95–112  ·  view source on GitHub ↗

* Wrapper around parse_refname which skips the next delimiter. */

Source from the content-addressed store, hash-verified

93 * Wrapper around parse_refname which skips the next delimiter.
94 */
95static char *parse_next_refname(const char **next)
96{
97 if (line_termination) {
98 /* Without -z, consume SP and use next argument */
99 if (!**next || **next == line_termination)
100 return NULL;
101 if (**next != ' ')
102 die("expected SP but got: %s", *next);
103 } else {
104 /* With -z, read the next NUL-terminated line */
105 if (**next)
106 return NULL;
107 }
108 /* Skip the delimiter */
109 (*next)++;
110
111 return parse_refname(next);
112}
113
114/*
115 * Wrapper around parse_arg which skips the next delimiter.

Callers 4

parse_cmd_symref_updateFunction · 0.85
parse_cmd_symref_createFunction · 0.85
parse_cmd_symref_deleteFunction · 0.85
parse_cmd_symref_verifyFunction · 0.85

Calls 2

parse_refnameFunction · 0.85
dieFunction · 0.50

Tested by

no test coverage detected