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

Function queue_command

builtin/receive-pack.c:2142–2165  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2140}
2141
2142static struct command **queue_command(struct command **tail,
2143 const char *line,
2144 int linelen)
2145{
2146 struct object_id old_oid, new_oid;
2147 struct command *cmd;
2148 const char *refname;
2149 int reflen;
2150 const char *p;
2151
2152 if (parse_oid_hex(line, &old_oid, &p) ||
2153 *p++ != ' ' ||
2154 parse_oid_hex(p, &new_oid, &p) ||
2155 *p++ != ' ')
2156 die("protocol error: expected old/new/ref, got '%s'", line);
2157
2158 refname = p;
2159 reflen = linelen - (p - line);
2160 FLEX_ALLOC_MEM(cmd, ref_name, refname, reflen);
2161 oidcpy(&cmd->old_oid, &old_oid);
2162 oidcpy(&cmd->new_oid, &new_oid);
2163 *tail = cmd;
2164 return &cmd->next;
2165}
2166
2167static void free_commands(struct command *commands)
2168{

Callers 2

queue_commands_from_certFunction · 0.85
read_head_infoFunction · 0.85

Calls 3

parse_oid_hexFunction · 0.85
oidcpyFunction · 0.85
dieFunction · 0.50

Tested by

no test coverage detected