Git: 1 - Shared host: 0
CGI-git defeated my shared host. Retrieving commit history and displaying git diff or anything git log resulted in weird anomalies which I think is some sort of race condition causing the script to occasionally fall over in a sorry heap.
I stop here.
I’ve rolled back to not displaying commit history at all and so far, so good. I have not seen one error or crash, touch wood.
I have added the last commit timestamp to the front repository overview only and will cease-and-desist moving forward on the development of this on my shared host. It does work at full throttle and will work on a server with more resources, but this is not for shared hosts. It’s way too process-intensive when retrieving commits, particularly on large repositories. I’ve been fortunate thus far to not receive any complaints from my hosting provider.
Looking at others like Gitea, it was interesting to discover that they actually require a database for their solution. I think I now know why. Reading from a database is soooo much faster than Git. Git is a bloody monster!
The full code is now running from elsewhere with more resources. I’ll continue to test and host it from there with the aim of releasing the code soon. For now, the slimmed-down, commit-free version is on my repositories if anyone is interested in playing with this toy.
Getting lost in this project and learning Git got me asking myself: what is the actual value of an online read-only Git viewer for a personal site? Typical visitors to a personal site or blog may click a link to the repo and maybe clone it (if they care). But they can browse the code on their own machine after cloning, no? Maybe someone might look at the commit history in the viewer once out of curiosity. Maybe not.
Then it hit me. I am building this thing for me. I’m learning how to code; honing the skills I have and gaining some other new ones. My brain is fried, but it has satisfied me immensely to produce this totally unnecessary program. There was no need; it was a bit of a self-challenge to see if I can cherry pick the things I want to see in a Cgit or a Gitea without having to spend my time tweaking someone else’s messy code and config.
And this is my own messy code…for me to enjoy and for others to look at and say “Yuk!”
