Sign in

Search issue titles and bodies, change requests and comments. Private repositories you cannot read are not included.

vole
Clone

Read only, no credentials:

https://rodent.software/git/vole.git

Write over SSH with a registered key:

git clone ssh://git@0.0.0.0:2222/vole.git

A free and open-source forge that lives in your Git repo.

Refresh the issue index from what changed

34a404b394dd9abcce0a67e32e99342c69595413 · Keenan Nemetz · 10d ago · parent fdf2340f

Refresh the issue index from what changed

A page read after a write used to reload every issue and renumber the repository from the whole branch history. Ensure now applies the difference between the indexed commit and the tip: it reloads only changed issues, adds only the numbers the range created, and leaves every other row alone. A rewritten branch or a missing index still falls back to the full rebuild.

The detail page and the browser write handlers now read one issue instead of the whole issue tree. Issue writes no longer re-validate the whole metadata tree after a write the writer already validated; the pre-receive hook still owns that check for pushes.

server/web/comment_writes.go +6−4

@@ -41,7 +41,8 @@ type commentTopic struct {
41 41 // has no diff to point into).
42 42 anchorFor func(path string, line int, side string) (*metadata.Anchor, error)
43 43 // validate re-checks the metadata branch after a write. Problems are logged,
44 // never shown to the browser.
44 // never shown to the browser. It is nil on a surface whose writer already
45 // validated everything it wrote.
45 46 validate func() []string
46 47 // The audit actions, one per write.
47 48 auditAdd, auditEdit, auditRemove string
@@ -94,7 +95,6 @@ func (w *Web) issueTopic(rw http.ResponseWriter, r *http.Request, m *repo.Meta)
94 95 _, err := metadata.DeleteIssueComment(m.Git(), id, commentID, author)
95 96 return err
96 97 },
97 validate: func() []string { return metadata.ValidateIssues(m.Git(), metadata.Ref) },
98 98 auditAdd: "web.issue.comment",
99 99 auditEdit: "web.issue.comment.edit",
100 100 auditRemove: "web.issue.comment.delete",
@@ -340,8 +340,10 @@ func commentAuditDetail(topicID, commentID, author, actor string) string {
340 340 // a plain form post.
341 341 func (w *Web) finishComment(rw http.ResponseWriter, r *http.Request, ctx *writeContext, t *commentTopic, action, subject, detail, next string) {
342 342 w.audit(action, ctx.Name, subject, detail)
343 if problems := t.validate(); len(problems) > 0 {
344 w.Logger("web: comment write left the metadata tree invalid: %v", problems)
343 if t.validate != nil {
344 if problems := t.validate(); len(problems) > 0 {
345 w.Logger("web: comment write left the metadata tree invalid: %v", problems)
346 }
345 347 }
346 348 if !htmxRequest(r) {
347 349 http.Redirect(rw, r, next, http.StatusSeeOther)