mailinfo: simplify parsing of header values
commitf447d0293e803d9acf390bbdf373ed98bdc125f4
authorJeff King <peff@peff.net>
Tue, 11 Feb 2020 17:19:23 +0000 (11 12:19 -0500)
committerJunio C Hamano <gitster@pobox.com>
Tue, 11 Feb 2020 18:19:33 +0000 (11 10:19 -0800)
treea292cefbae47c8d59700d0aa83d267115e3f7390
parentb6537d83ee30693efb17a35321b8bd03b752033a
mailinfo: simplify parsing of header values

Our code to parse header values first checks to see if a line starts
with a header, and then manually skips past the matched string to find
the value. We can do this all in one step by modeling after
skip_prefix(), which returns a pointer into the string after the
parsing.

This lets us remove some repeated strings, and will also enable us to
parse more flexibly in a future patch.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
mailinfo.c