allow auto-pruning of .git tags
Signed-off-by: Jeff Carr <jcarr@wit.com>
This commit is contained in:
parent
fb88285aeb
commit
a0147a9f4f
|
@ -84,7 +84,9 @@ func globalDisplayOptions(box *gui.Node) {
|
|||
filename := filepath.Join(goSrcDir, "go.work")
|
||||
|
||||
f, err := os.OpenFile(filename, os.O_WRONLY|os.O_CREATE, 0600)
|
||||
if err != nil { return }
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
defer f.Close()
|
||||
fmt.Fprintln(f, "go 1.21.4")
|
||||
fmt.Fprintln(f, "")
|
||||
|
@ -100,6 +102,47 @@ func globalDisplayOptions(box *gui.Node) {
|
|||
fmt.Fprintln(f, ")")
|
||||
})
|
||||
|
||||
group1.NewButton("list all tags", func() {
|
||||
me.autotypistWindow.Disable()
|
||||
defer me.autotypistWindow.Enable()
|
||||
for _, repo := range me.allrepos {
|
||||
tagsW := repo.status.TagsW
|
||||
if tagsW == nil {
|
||||
repo.status.TagWindow()
|
||||
tagsW = repo.status.TagsW
|
||||
// tagsW.Prune()
|
||||
continue
|
||||
}
|
||||
allTags := tagsW.ListAll()
|
||||
for _, t := range allTags {
|
||||
log.Info("found tag:", t.TagString(), "from", repo.status.String())
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
group1.NewButton("delete all dup tags", func() {
|
||||
me.autotypistWindow.Disable()
|
||||
defer me.autotypistWindow.Enable()
|
||||
for _, repo := range me.allrepos {
|
||||
tagsW := repo.status.TagsW
|
||||
if tagsW == nil {
|
||||
repo.status.TagWindow()
|
||||
tagsW = repo.status.TagsW
|
||||
tagsW.PruneSmart()
|
||||
continue
|
||||
}
|
||||
deleteTags := tagsW.List()
|
||||
for _, t := range deleteTags {
|
||||
if me.autoDryRun.Checked() {
|
||||
log.Info("delete tag --dry-run:", t.TagString(), "from", repo.status.String())
|
||||
} else {
|
||||
log.Info("Deleting tag:", t.TagString(), "from", repo.status.String())
|
||||
// tagsW.Delete(t)
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
group2 := vbox.NewGroup("Debugger")
|
||||
group2.NewButton("logging Window", func() {
|
||||
logsettings.LogWindow()
|
||||
|
|
Loading…
Reference in New Issue