Why
The landing card shows the default branch tip (SHA, subject, author, time) and
the language the repository is mostly made of. Until now it read all of that from
git on every home page render: symbolic-ref to open the repository,
rev-parse for the tip, log -1 for the subject and author, and ls-tree -r
for the language — per repository, on the instance’s busiest page.
Those facts change only when a push moves the default branch, so a page read is the wrong place to compute them.
Scope
reposgainshead_sha,head_subject,head_author,head_when,languageandlang_class;index.Entryreturns them with the rest of the row.Store.RefreshHeadrecomputes the summary. It compares the recorded tip with the branch tip first, so a metadata or tag push costs onerev-parseand no tree walk. It runs from post-receive, from the rebuild, and after the default branch changes in settings.- The language mapping moves to
internal/lang, shared by the web pages and the summary (one table instead oflanguageForplusfileClass). - The home card reads head, language, counts, ACL and newest event time from the index. The home page starts no git process; the all-git card builder remains the fallback for a Web without an index.
Acceptance
- After a push, the home card shows the pushed tip’s SHA, subject, author and language without any git call on the read.
- A metadata-only or tag push does not walk the default branch’s tree.
- Deleting the default branch clears the summary; a rebuild restores it from the repository.
- Changing the default branch updates the card’s branch and summary.
- The home page runs zero git child processes during a load run.
Notes
vole admin index rebuild recomputes every summary; a repository whose head was
never recorded shows “No commits yet” until its next push or rebuild, which the
schema-version reset already forces on upgrade.