From: Jonathan Corbet Date: Fri, 5 Sep 2008 19:53:35 +0000 (-0600) Subject: Don't accept totally bogus dates X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=558dbe1cbef23cc2ccb05e70f5b0e3db9fb497b5;p=people%2Flarsk%2Fxenproject-org-gitdm.git Don't accept totally bogus dates Yanmin Zhang committed a patch (09f2724a786f76475ef2985cf84f5359c553aade) which claims to have been written in August, 2030. Code that bleeding-edge makes gitdm confused, so pretend it's just normal, contemporary stuff. --- diff --git a/gitdm b/gitdm index 6c05745..20ec257 100755 --- a/gitdm +++ b/gitdm @@ -19,7 +19,7 @@ from patterns import * class patch: pass - +Today = datetime.date.today() # # Control options. # @@ -181,6 +181,9 @@ def grabpatch(): if m: dt = rfc822.parsedate(m.group (2)) p.date = datetime.date (dt[0], dt[1], dt[2]) + if p.date > Today: + sys.stderr.write ('Funky date: %s\n' % p.date) + p.date = Today continue # # If we have a file filter, check for file lines.