charmbracelet / soft-serve

The mighty, self-hostable Git server for the command line🍦
MIT License
5.34k stars 135 forks source link

Access raw file content from HTTP #456

Open aymanbagabas opened 10 months ago

aymanbagabas commented 10 months ago

Is your feature request related to a problem? Please describe. Add the ability to view file contents using HTTP similar to the ssh soft repo blob ... command

Describe the solution you'd like New endpoint /<repo>/blob/<rev>/<path> that takes the revision (branch, tag, commit) and path and returns the contents of the file. Accept both content types text/plain & application/octet-stream to return plain text or download the file at path.

https://github.com/charmbracelet/soft-serve/discussions/455