261101.5 · 4c2d0371693dc2f3c3f3293bd77a9e2267d527d3
git.go splits off the history pages
git.go held both running git and the pages built from it. The timeline, log and commit pages and their diffs move to historypage.go with their tests. git.go keeps running git, reading commits and the cache warm.
Declarations moved unchanged, as a sorted comparison of every line outside the import blocks confirms. git blame -C -C traces them.
reading declarations
Changes to live_test.go. All files
@@ -302,3 +302,17 @@ func TestPagesRecord(t *testing.T) { t.Errorf("record %q", b) } }++// A commit reloads an open history page.+func TestLiveReloadsOnCommit(t *testing.T) {+ needGit(t)+ s, _, dir, ts := liveTree(t)+ exec.Command("git", "init", "-q", dir).Run()+ commitAll(t, dir, "First")+ lines := stream(t, s, ts, "/a/")+ time.Sleep(50 * time.Millisecond)+ exec.Command("git", "-C", dir, "-c", "user.name=t", "-c", "user.email=t@x", "commit", "-q", "--allow-empty", "-m", "Second").Run()+ if !reloads(lines, 2*time.Second) {+ t.Fatal("no reload after a commit")+ }+}