serve: rename is_command() to parse_command()

The is_command() function not only tells us whether the pktline is a valid command string, but it also parses out the command (and complains if we see a duplicate). Let's rename it to make those extra functions a bit more obvious. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Jeff King committed Sep 14, 2021 at 11:30 UTC 76804526f9795f94fb666248653a5f41ed921241
1 file changed +2 -2
serve.c
+2 -2
@@ -163,7 +163,7 @@ static int is_valid_capability(const char *key)
163 return c && c->advertise(the_repository, NULL);
164 }
165
166 -static int is_command(const char *key, struct protocol_capability **command)
166 +static int parse_command(const char *key, struct protocol_capability **command)
167 {
168 const char *out;
169
@@ -251,7 +251,7 @@ static int process_request(void)
251 BUG("Should have already died when seeing EOF");
252 case PACKET_READ_NORMAL:
253 /* collect request; a sequence of keys and values */
254 - if (is_command(reader.line, &command) ||
254 + if (parse_command(reader.line, &command) ||
255 is_valid_capability(reader.line))
256 strvec_push(&keys, reader.line);
257 else