You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Feb 15, 2022. It is now read-only.
Version control is hard. Let's let git do the work for us. This will allow for greater adoption and more features.
Additions
add tags on left-hand side of browser
add commits somewhere (where?)
add basic UI for git: files, directories in current commit
add parameters to GET request, something like index.php?tag=v1.1 or ?commit=ba42a521
Deletions
snap.sh could be removed altogether
snappy.sh could be removed (why is it even here?)
upload.php could be removed since front-end only needs to ask for git directory
zipfiles and zip could be removed
Backend
I would like this to be as dynamic as possible, i.e. highlighting and html are not created until requested. Ideally the speed would be dependent only on git and pygments, both of which are pretty fast.
Summary
Use a cache dir, preferably ~/.cache/snap.
Given either commit or tag, create a subdirectory in cache with that name
(we'll assume for this project that rewriting history won't happen because that will be a nightmare).
Checkout the requested file from git and run it through pygments.
Provide the HTML back to the browser.