Skip to content
This repository was archived by the owner on Feb 15, 2022. It is now read-only.
This repository was archived by the owner on Feb 15, 2022. It is now read-only.

Move to git #2

@jyn514

Description

@jyn514

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions