Documentation
¶
Overview ¶
Package projects maps a bare project name to a checkout directory, for `-C r3` run from elsewhere. Lookup is off unless F10_ROOTS is set: GH-20 fenced the binary as answering for the repo it runs in, never walking the filesystem for others, and a basename search over projects is that walk.
Index ¶
Constants ¶
const RootsEnv = "F10_ROOTS"
RootsEnv is a PATH-style list of globs expanding to checkouts, such as `~/code/github.com/*/*`.
Variables ¶
var ErrDisabled = errors.New("finding a project by name needs " + RootsEnv +
" set to a colon-separated list of globs (for example ~/code/github.com/*/*); a path such as -C ../r3 always works")
ErrDisabled means a name was given while name lookup is off.
Functions ¶
func Find ¶ added in v0.26.0
Find is the one checkout named name under the roots; none or several are errors naming what was searched, since a guess would run a command against the wrong repo.
func IsCheckout ¶ added in v0.34.0
IsCheckout reports whether dir is a git checkout. A linked worktree carries .git as a file rather than a directory, so both count.
Types ¶
This section is empty.