Add todo mode and replace the plan with TODO.md

This commit is contained in:
Ian Gulliver
2026-10-15 07:23:17 -07:00
parent 60a1d221f4
commit 1f44bc6d91
25 changed files with 1259 additions and 637 deletions
+12
View File
@@ -236,6 +236,18 @@ func Head(dir string) (string, error) {
return run(dir, "rev-parse", "HEAD")
}
func ReadFile(repo, rev, path string) (string, bool, error) {
_, _, code, err := runCode(repo, nil, "cat-file", "-e", rev+":"+path)
if err != nil {
return "", false, err
}
if code != 0 {
return "", false, nil
}
out, err := run(repo, "cat-file", "blob", rev+":"+path)
return out, true, err
}
func CommitAll(dir, message, name, email string) (string, error) {
status, err := run(dir, "status", "--porcelain", "--untracked-files=all")
if err != nil {