summaryrefslogtreecommitdiff
path: root/notes.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2024-12-18 01:29:07 -0600
committerJeff Carr <[email protected]>2024-12-18 01:29:07 -0600
commit5c156fa55e2ee7980a6bbfc9a0a7df5b8984aef0 (patch)
tree6676861bb505351bd2ab375a7036f0a59ebc14d9 /notes.go
parent4879befeb3ad89f0357f995413afcab904296599 (diff)
add --purge to get rid of all notesv0.0.19
Diffstat (limited to 'notes.go')
-rw-r--r--notes.go19
1 files changed, 19 insertions, 0 deletions
diff --git a/notes.go b/notes.go
new file mode 100644
index 0000000..59543c9
--- /dev/null
+++ b/notes.go
@@ -0,0 +1,19 @@
+package main
+
+import (
+ "strings"
+
+ "go.wit.com/lib/protobuf/gitpb"
+ "go.wit.com/log"
+)
+
+func purgeNotes(repo *gitpb.Repo) error {
+ result := repo.Run([]string{"git", "notes", "list"})
+ for _, line := range result.Stdout {
+ parts := strings.Fields(line)
+ log.Info("line:", line, "part", parts[1])
+ blah := repo.Run([]string{"git", "notes", "remove", parts[1]})
+ log.Info(strings.Join(blah.Stdout, "\n"))
+ }
+ return nil
+}