refactor: remove rootDir param, auto-detect .git as boundary

Walk up from task dir to find .git instead of threading rootDir through
Globs, checkers, and itemsFromFor. Gitignore rules are discarded if no
.git is found, matching ripgrep's require_git behavior. This keeps the
Globs signature clean and makes the future .taskignore integration
straightforward (loaded at setup like .taskrc, separate boundary).
This commit is contained in:
Valentin Maerten
2026-04-04 10:44:35 +02:00
parent 13ef1b2dda
commit 7cea8e3364
3 changed files with 28 additions and 34 deletions

View File

@@ -156,7 +156,7 @@ func (t *Task) UnmarshalYAML(node *yaml.Node) error {
Internal bool
Method string
Prefix string
IgnoreError bool `yaml:"ignore_error"`
IgnoreError bool `yaml:"ignore_error"`
Gitignore *bool `yaml:"gitignore,omitempty"`
Run string
Platforms []*Platform