diff options
author | Jonathan Corbet <corbet@lwn.net> | 2008-09-05 13:53:35 -0600 |
---|---|---|
committer | Jonathan Corbet <corbet@lwn.net> | 2008-09-05 13:53:35 -0600 |
commit | 558dbe1cbef23cc2ccb05e70f5b0e3db9fb497b5 (patch) | |
tree | 2efc3ab7f413e16b371d581fef2ac31939324814 | |
parent | dd091c42680e001cb51e0d3d1ebfdc51bea93f0b (diff) |
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.
-rwxr-xr-x | gitdm | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -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. |