Artifact 73cd6fb7d380dadcd729010a343818fc00ab3e2d639fc302bcdead3af8f0f4fb:
- File
cli/repo_annotate.go
— part of check-in
[c61a17d9ab]
at
2026-10-22 16:25:41
on branch feat/horizon-cones
— feat: expose the structural horizon and name it where history ends
Horizon gains Structural, whose zero value is the content horizon, so a Horizon built before it means what it meant; clone and sync results say how many replies served the structural level and whether the store fell back. repo clone and repo cone store take --structural with --horizon.
A structural store's history ends at its horizon, which the commands now say rather than leave bare phantoms (draft-fossil-horizon-00 §5.4, §5.5): repo info names the horizon and the check-ins below it, repo verify counts them apart from damage, and checkout, diff and annotate of a check-in below C fail naming the horizon and the deepen that reaches it. (user: [email protected], size: 912) [annotate] [blame] [check-ins using] [more...]
package cli import ( "fmt" libfossil "github.com/danmestas/go-libfossil" ) // RepoAnnotateCmd annotates file lines with version history. type RepoAnnotateCmd struct { File string `arg:"" required:"" help:"File to annotate"` Version string `help:"Starting version (default: tip)"` } func (c *RepoAnnotateCmd) Run(g *Globals) error { r, err := g.OpenRepo() if err != nil { return err } defer r.Close() startRID, err := resolveCheckin(r, c.Version) if err != nil { return err } lines, err := r.Annotate(libfossil.AnnotateOpts{ FilePath: c.File, StartRID: startRID, }) if err != nil { return err } for _, l := range lines { uuid := l.UUID if len(uuid) > 10 { uuid = uuid[:10] } fmt.Printf("%s %8s %s | %s\n", uuid, l.User, l.Date.Format("2006-01-02"), l.Text) } return nil } // RepoBlameCmd is an alias for annotate. type RepoBlameCmd struct { RepoAnnotateCmd }