Add list command to display all tracked entries
Adds Garden.List() method that returns manifest entries, unit tests for empty and populated repos, and a CLI command that formats output by entry type (file with hash prefix, link with target, directory). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
8
garden/list.go
Normal file
8
garden/list.go
Normal file
@@ -0,0 +1,8 @@
|
||||
package garden
|
||||
|
||||
import "github.com/kisom/sgard/manifest"
|
||||
|
||||
// List returns all tracked entries from the manifest.
|
||||
func (g *Garden) List() []manifest.Entry {
|
||||
return g.manifest.Files
|
||||
}
|
||||
Reference in New Issue
Block a user