top | item 43275198

(no title)

nhanb | 1 year ago

I once explored doing just that: https://github.com/nhanb/boast

However I never got around to finishing it, mainly because I couldn't decide on where to stop: should I also generate commits from all non-master branches etc.

I flirted with the idea of a browser-side repo viewer too, but re-implementing git packfile parsing in js didn't seem like something I'd want to spend my time on, so I moved on. Glad to see others pondering the same thing though.

discuss

order

mikepurvis|1 year ago

That does get intense pretty quickly, if you're generating a source and commit/diff pages for every file * every commit. Probably just single commits would make the most sense and then a source browser for each branch.

That said, JavaScript libgit2 is a thing [1], so doing it "properly" in a client app is totally possible.

[1]: https://github.com/libgit2/libgit2/issues/4376 | https://github.com/petersalomonsen/wasm-git

notpushkin|1 year ago

I’d go with a combined approach. Static pages for every file on master, JS for everything else. This way master branch loads instantly, but other branches (with diff, blame etc) are also available.

Hmmm, I might give it a go one day.

sshine|1 year ago

Nice work. This has been on my bucket list to make for a few years. If you ask me, yes: make an .html file for each non-orphan commit on each branch.