feat: look for repos in the usual folders, not just ~/git (#57)

Without roots in the config, repos are found under whichever of ~/git,
~/repo, ~/repos, ~/projects, ~/code, ~/source and ~/src exist. Missing
ones cost a stat each. A root that's a symlink to another is scanned
once, and a repo under two roots keeps the first one's name.

Reviewed-on: #57
Co-authored-by: Karl-Einar Bergstrøm <karl-einarb@outlook.com>
This commit was merged in pull request #57.
This commit is contained in:
keb authored and Karl-Einar Bergstrøm committed 2026-10-13 15:37:55 +02:00
1 parent 87141cb53b
commit 47ef86293d
5 files changed
+48 -11

No files matched your search

+2 -2
View File
@@ -115,8 +115,8 @@ type Repos struct {
// Enabled defaults to true.
Enabled *bool `yaml:"enabled"`
Paths []string `yaml:"paths"`
// Roots are folders of repos. Defaults to ~/git; an empty list
// turns it off.
// Roots are folders of repos. Defaults to repo.DefaultRoots (~/git,
// ~/src, ~/code and the like); an empty list turns it off.
Roots *[]string `yaml:"roots"`
// Include and Exclude are globs relative to a repo's root (** for any
// depth), for repos without their own .lazysecrets.yaml. Without them,