It all started with a simple pull request [1] to fix a bug. I have never attempted to just “merge” a pull request on Github before, but I figured, with such a simple change [2], why not try? Why not indeed.
Well, it broke my local repository. The commit message wasn't what I would have liked, and I felt a revision of the version number was required, which also involved updating the makefile and the Luarocks specification file [3]. I made the mistake (I think—I don't know) of amending the merge message with a reformatted title and extra files and that was that. I was unable to push the changes back to Github.
I ended up having to reset both my local repositories and the Github repository. Hard. As in with the git reset --hard nuclear option. And hand added the patch into the code, redid all the changes to the makefile and Luarocks specification file multiple times. Ugly stuff. But I got it as I like it.
And then I went to load the new version of the code into Luarocks [4] and of course it failed. Of course. Github decided several months ago to depcrecate support for git: URL (Uniform Resource Locator)s [5] and guess what I'm using?
Sigh.
It took longer than I liked to find out I need to switch to using git+https: URLs, and several version bumps of several of my Lua modules to get it all straightened out. I just cannot update the Luarocks specification files properly. It always takes way too many tries for me to get it right. Aaaaaah!
I'm also unsure why the Github merge failed for me. Am I not using the “proper” work flow? Is it because Github considers itself the “primary repository” when in fact, for my stuff, it isn't? I don't know. Perhaps I'm slowly becoming computer illiterate [6].
It seems the latest version of Luarocks will auto-correct git: URLs [7]. [See what you get when you don't update every 20 minutes? —Editor] [Shut up, you! —Sean] I'm not sure what to think of this.
[1] https://github.com/spc476/SPCDNS/pull/9
[2] https://github.com/spc476/SPCDNS/pull/9/commits/0931bc7527b491ad54619fe8eb21bd957953d5a2
[3] https://github.com/luarocks/luarocks/wiki/Rockspec-format
[5] https://github.blog/2021-09-01-improving-git-protocol-security-github/
[7] https://github.com/luarocks/luarocks/commit/9ff512e35455939f02eaec2318e3acc77782fdeb