Digging into it further with dfly people over IRC, it's been discovered:
* The bug does not appear with ghc 8.10.5, with git-annex 20210903 or 20210223.
* But it consistently happens with ghc 8.10.7, with all the versions I tried.
* I also noticed that `git annex init` does not create the file `.git/annex/index` when the bug is present.
Has anyone tried git-annex with ghc 8.10.7 on a different OS?
I tried to figure out why `.git/annex/index` was not being created, but I had some trouble figuring out which line of code is supposed to create it. If someone could point me there I could do some further debugging to see why it isn't created.