From: Junio C Hamano Date: Wed, 5 Apr 2006 05:57:15 +0000 (-0700) Subject: parse_date(): fix parsing 03/10/2006 X-Git-Tag: v1.2.6~3 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=fa0cdab537b1ae635b5a64cddd29cddf2dfc4a1b;p=git.git parse_date(): fix parsing 03/10/2006 The comment associated with the date parsing code for three numbers separated with slashes or dashes implied we wanted to interpret using this order: yyyy-mm-dd yyyy-dd-mm mm-dd-yy dd-mm-yy However, the actual code had the last two wrong, and making it prefer dd-mm-yy format over mm-dd-yy. Signed-off-by: Junio C Hamano --- diff --git a/date.c b/date.c index 416ea579a..18a07103d 100644 --- a/date.c +++ b/date.c @@ -257,10 +257,10 @@ static int match_multi_number(unsigned long num, char c, const char *date, char break; } /* mm/dd/yy ? */ - if (is_date(num3, num2, num, tm)) + if (is_date(num3, num, num2, tm)) break; /* dd/mm/yy ? */ - if (is_date(num3, num, num2, tm)) + if (is_date(num3, num2, num, tm)) break; return 0; }