From d8a8408e3f280386877e487df6f658db88cdc4b1 Mon Sep 17 00:00:00 2001 From: Justin Bishop Date: Tue, 31 Mar 2026 13:35:00 -0700 Subject: [PATCH] feat: add section header when appending to .gitignore td init now adds .todos/ under a "# td" header instead of blindly appending to the end of .gitignore, making it clear where the entry came from. Co-Authored-By: Claude Opus 4.6 (1M context) --- cmd/init.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmd/init.go b/cmd/init.go index 4b7132b5..219d3633 100644 --- a/cmd/init.go +++ b/cmd/init.go @@ -72,7 +72,7 @@ func addToGitignore(path string) { return } - // Append to file + // Append to file with a section header f, err := os.OpenFile(path, os.O_APPEND|os.O_CREATE|os.O_WRONLY, 0644) if err != nil { return @@ -84,7 +84,7 @@ func addToGitignore(path string) { f.WriteString("\n") } - f.WriteString(".todos/\n") + f.WriteString("\n\n# td\n.todos/\n") fmt.Println("Added .todos/ to .gitignore") }