Re: Anyone know what is creating commits with bogus dates?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, May 21, 2020 at 10:49:17AM -0700, Elijah Newren wrote:

> I wanted to report that we seem to have a number of repos in the wild
> with bogus (as in "won't even parse") dates.
> 
> I first discovered such a repository in the wild a while ago with
> rails.git.  It has a commit with a recorded timezone of "+051800" for
> both author and committer.  Everything else about the commit looks
> fine.  See https://github.com/rails/rails/commit/4cf94979c9f4d6683c9338d694d5eb3106a4e734.
> 
> Some google searches at the time turned up a few other examples, all
> with the same "+051800" issue.  I put a special workaround for it into
> filter-repo because I figured it was slightly prominent but probably
> limited to that special timezone.  The fact that it was six digits but
> the last two were zeros made it seem not quite as bad as it could be.

I can't remember the source of the bug, but we've had a workaround in
GitHub's incoming fsck checks to allow 6-digit zones like this since
August 2011. I'm almost certain that it came up because of that
rails/rails commit, but I don't remember the culprit implementation. I'm
sure we would have dug it up and fixed it at the time.

Sadly our commit message for the fsck tweak gives no further details,
nor can I dig up anything out of issues/etc.

I _think_ it wasn't GitHub/grit which did this (the 0-prefixed tree
modes you might come across are, though). I couldn't find any mention of
the fix there, at least. I'd suspect perhaps libgit2, but I also
couldn't find any fix.

But I think it would be safe to assume the bug is long-since fixed, and
it's nice if you can be a bit more lenient on the parsing for historical
issues like this. Arguably fast-export ought to be normalizing it to
something syntactically correct (just like we probably do with other
unparsable dates), though I guess you could argue that a filter might
want to see the broken form in order to fix it in a custom way.

-Peff



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux