gitserver: Empty creatordate leads to bad date format error
Created by: varungandhi-src
We're seeing an error in prod for torvalds/Linux: (logs)
gitserver.RefDescriptions: unexpected output from git for-each-ref (bad date format) \"c39ae07f393806ccf406ef966e9a15afc43cc36arefs/tags/v2.6.11 \"
It seems like the problem is that somehow, one is ending up an empty value for %(creatordate)
, which the code doesn't handle. It's not super clear when why that is happening here; tags seem to act as roots for git gc, so resetting HEAD, rebasing etc. don't end up affecting the creatordate
. Maybe there's some other git operation that leaves tags behind pointing to a non-existent commit?
One unusual thing is that c39ae07f393806ccf406ef966e9a15afc43cc36a
isn't a valid commit hash for torvalds/linux right now. However, the GitHub UI does show v2.6.11
as a valid tag. However, if you click on that tag, it gives a 404.