···2 <picture>
3 <img alt="ugit logo" width="250" src="./assets/ugit.svg" />
4 </picture>
5- <h3 align="center">ugit</h3>
6</p>
78Minimal git server
910-ugit allows cloning via HTTPS/SSH, but can only be pushed to via SSH.
1112There are no plans to directly support issues or PR workflows, although webhooks are planned and auxillary software may be created to facilitate these things.
13-For now, if you wish to collaborate, please send me patches at [ugit@jolheiser.com](mailto:git@jolheiser.com).
1415-Currently all HTML is allowed in markdown, ugit is intended to be run by/for a trusted user.
1617## Getting your public SSH keys from another forge
18
···2 <picture>
3 <img alt="ugit logo" width="250" src="./assets/ugit.svg" />
4 </picture>
5+ <h3 align="center">ยตgit</h3>
6</p>
78Minimal git server
910+ยตgit allows cloning via HTTPS/SSH, but can only be pushed to via SSH.
1112There are no plans to directly support issues or PR workflows, although webhooks are planned and auxillary software may be created to facilitate these things.
13+If you wish to collaborate, please send me patches via [git-pr](https://pr.jolheiser.com/repos/ugit).
1415+Currently all HTML is allowed in markdown, ยตgit is intended to be run by/for a trusted user.
1617## Getting your public SSH keys from another forge
18
···18// Server is the container struct for the HTTP server
19type Server struct {
20 port int
21- mux *chi.Mux
22}
2324// ListenAndServe simply wraps http.ListenAndServe to contain the functionality here
25func (s Server) ListenAndServe() error {
26- return http.ListenAndServe(fmt.Sprintf("localhost:%d", s.port), s.mux)
27}
2829// Settings is the configuration for the HTTP server
···34 Port int
35 RepoDir string
36 Profile Profile
037}
3839// Profile is the index profile
···101 r.Get("/tailwind.css", html.TailwindHandler)
102 })
103104- return Server{mux: mux, port: settings.Port}
105}
106107type repoHandler struct {
···125 Name: chi.URLParam(r, "repo"),
126 Ref: ref,
127 CloneURL: rh.s.CloneURL,
0000000000000128 }
129}
130
···18// Server is the container struct for the HTTP server
19type Server struct {
20 port int
21+ Mux *chi.Mux
22}
2324// ListenAndServe simply wraps http.ListenAndServe to contain the functionality here
25func (s Server) ListenAndServe() error {
26+ return http.ListenAndServe(fmt.Sprintf("localhost:%d", s.port), s.Mux)
27}
2829// Settings is the configuration for the HTTP server
···34 Port int
35 RepoDir string
36 Profile Profile
37+ ShowPrivate bool
38}
3940// Profile is the index profile
···102 r.Get("/tailwind.css", html.TailwindHandler)
103 })
104105+ return Server{Mux: mux, port: settings.Port}
106}
107108type repoHandler struct {
···126 Name: chi.URLParam(r, "repo"),
127 Ref: ref,
128 CloneURL: rh.s.CloneURL,
129+ Tags: repo.Meta.Tags.Slice(),
130+ }
131+}
132+133+func (rh repoHandler) repoBreadcrumbContext(repo *git.Repo, r *http.Request, path string) html.RepoBreadcrumbComponentContext {
134+ ref := chi.URLParam(r, "ref")
135+ if ref == "" {
136+ ref, _ = repo.DefaultBranch()
137+ }
138+ return html.RepoBreadcrumbComponentContext{
139+ Repo: chi.URLParam(r, "repo"),
140+ Ref: ref,
141+ Path: path,
142 }
143}
144