mailinfo: simplify parsing of header values
authorJeff King <redacted>
Tue, 11 Feb 2020 17:19:23 +0000 (12:19 -0500)
committerJunio C Hamano <redacted>
Tue, 11 Feb 2020 18:19:33 +0000 (10:19 -0800)
commitf447d0293e803d9acf390bbdf373ed98bdc125f4
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 <redacted>
Signed-off-by: Junio C Hamano <redacted>
mailinfo.c
git clone https://git.99rst.org/PROJECT