dateformat: parse %(xxdate) %(yydate:format) correctly
Andy Parkins noticed that parsing of the above would not correctly notice that xxdate does not have any format specifier. Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
parent
d392e712a8
commit
070f6918d1
@ -113,7 +113,7 @@ static int parse_atom(const char *atom, const char *ep)
|
||||
* table.
|
||||
*/
|
||||
const char *formatp = strchr(sp, ':');
|
||||
if (!formatp)
|
||||
if (!formatp || ep < formatp)
|
||||
formatp = ep;
|
||||
if (len == formatp - sp && !memcmp(valid_atom[i].name, sp, len))
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user