js' blog

I screwed up the ObjFW Git repository
Created: 18.06.2022 19:44 UTC

Today, I realized that I screwed up the ObjFW Git repository, while the Fossil repository was fine at all times. You need to delete your clone and do a fresh clone if you checked out ObjFW via Git. Other repositories are not affected and only the master branch is affected - more on that later.

So what happened? In December 2021, shortly after Christmas and before New Years, my server died. The remote console reported a power supply failure, nothing that could be fixed remotely. And unfortunately, because it was between the years, it was impossible to get to the data center and fix the server (I would have had a spare PSU - but I was also in a different country). So I decided to set up the services that were on said server on my RockPro64, which at the time was already hosting my Matrix server. And this is where the mistake happened.

At this point, I need to go back a step and explain how the mirroring of the Fossil repository to Git works. On my server, there's a cronjob every 5 minutes that checks all Fossil repositories and exports all new commits to Git and pushes them to GitHub. Because Fossil deals with user names and Git with real names + e-mail addresses, some mapping is needed. Because Fossil's fossil git export command lacks support for such a mapping (see my previous blog post on this), I patched this mapping into the code itself. I build Fossil using pkgsrc, which makes it easy to maintain a local patch set. When I recreated this patch set on the RockPro64, I was in a huge hurry to restore all my services and made a typo: I typoed my last name in the mapping. My laptop's keyboard is sometimes bad at debouncing keys, so sometimes letters repeat, and this is exactly what happened. And given the hurry I was in, I didn't notice.

So what happened? Well, computers being computers, they do what they are told. So for half a year, it would happily push with the wrong name. And I wouldn't notice for half a year, because GitHub had the brilliant idea to fake that repositories only have a GitHub user name and not a real name + e-mail. Yes, they go through quite some length in their UI to act like Git uses GitHub user names and not real name + e-mail and make sure you never ever see a real name for a commit anywhere - you need to git clone to see that. Which in this case made sure that I would never see the typo, since I don't check ObjFW out via Git myself but only via Fossil. This is yet another case where GitHub's stupid idea to lie about commit authors caused harm (not to mention people leaking their real name when they don't want to and not noticing because GitHub acts like it's not there).

And because fixing this typo of course results in different Git commits being created, exporting from Fossil to Git after the fix rewrote all Git history since January 2022. The Fossil history of course remains unchanged and isn't being rewritten. Sorry for any inconvenience this causes.

So, why are other projects not affected, and only the master branch on ObjFW? Simple: Because I didn't even set up the mirror for anything but ObjFW's master branch when I was in the rush to restore my server and hence access to my digital life.