vole
Clone
Read only, no credentials:
https://rodent.software/vole.git
Write over SSH with a registered key:
git clone ssh://git@rodent.software:2222/vole.git
A free and open-source forge that lives in your Git repo.
Render issues, changes and the activity feed from the index
14b5c648a04090d0e718f5920f6abfc2d14c7274 · Keenan Nemetz · 10d ago · parent 9d8dd1bc
Render issues, changes and the activity feed from the index Stage 3: the pages that still read the metadata branch now read the rows the request already refreshed. - The issue page reads its issue, comments, labels, assignees and number from the index. Its one remaining git read is the backlink search (`log --grep`), which is a content search, not a record lookup. - A change page reads its one request from the index for a GET. A write request still reads git: it has no memo because it may have just changed the record, and it must not be answered by the version it replaced. - The activity feed builds its issue, change, comment and approval events from the index. It keeps the metadata log for state changes (a reopened issue is two events and the file only knows the last), the latest commit, and tags: the remaining git calls are content, not duplicates. Git calls per page on the fixture (40 files, 30 issues, 30 changes): issue view 7 -> 3 change view 12 -> 9 activity whole-tree reads -> one log, one commit, one tag listing The change page's remaining calls are the diff and the merge check; the issue page's are the backlink search.
server/web/issues.go +3−3
| @@ -201,8 +201,8 @@ func (w *Web) issueThread(r *http.Request, m *repo.Meta, iss *metadata.Issue, er | |||
| 201 | 201 | }, w.commentViews(m, iss.Comments)) | |
| 202 | 202 | } | |
| 203 | 203 | ||
| 204 | // IssueView renders one issue and its thread. The issue is read from git rather | ||
| 205 | // than the index, so bodies are never stale relative to the branch. | ||
| 204 | // IssueView renders one issue and its thread. The issue and its comments come | ||
| 205 | // from the index, which the request refreshed to the branch's current commit. | ||
| 206 | 206 | func (w *Web) IssueView(rw http.ResponseWriter, r *http.Request) { | |
| 207 | 207 | m, ok := w.open(rw, r) | |
| 208 | 208 | if !ok { | |
| @@ -213,7 +213,7 @@ func (w *Web) IssueView(rw http.ResponseWriter, r *http.Request) { | |||
| 213 | 213 | w.notFound(rw, r) | |
| 214 | 214 | return | |
| 215 | 215 | } | |
| 216 | iss, err := index.LoadIssue(m, id) | ||
| 216 | iss, err := w.issueAt(memoOf(r), m, id) | ||
| 217 | 217 | if err != nil { | |
| 218 | 218 | w.notFound(rw, r) | |
| 219 | 219 | return | |