unfiltered walker tree

This commit is contained in:
2026-09-15 11:16:27 +01:00
parent 6c365e9cde
commit 4396a6f619
4 changed files with 252 additions and 175 deletions
+5 -4
View File
@@ -23,6 +23,7 @@ type Result struct {
AbsRoot string
SingleFile bool
OmitTest bool
Cfg *config.Config
Commit *git.CommitInfo
Instructions string
}
@@ -67,7 +68,7 @@ func processSingleFile(cfg *config.Config) (*Result, error) {
Entries: []Entry{{RelPath: filepath.Base(cfg.AbsRoot), Size: info.Size()}},
AbsRoot: filepath.Dir(cfg.AbsRoot),
SingleFile: true,
OmitTest: cfg.OmitTest,
Cfg: cfg,
Commit: commitInfo,
Instructions: instContent,
}, nil
@@ -83,10 +84,10 @@ func walkDirectory(cfg *config.Config) (*Result, error) {
OmitMd: cfg.OmitMd,
}
result := &Result{AbsRoot: cfg.AbsRoot, OmitTest: cfg.OmitTest}
result := &Result{AbsRoot: cfg.AbsRoot, Cfg: cfg, OmitTest: cfg.OmitTest}
result.Commit = git.GetCommitInfo(cfg.AbsRoot)
if cfg.IncludeInstructions {
instContent, err := instructions.Read(cfg.AbsRoot)
if err != nil {