summaryrefslogtreecommitdiff
path: root/tagWindow.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2024-02-16 01:22:37 -0600
committerJeff Carr <[email protected]>2024-02-16 01:22:37 -0600
commit88ca40bcfa11f464828cace14a07a9b59a00d571 (patch)
treec1be5d276bbbe6058853a05b963d441dd35e87b2 /tagWindow.go
parent2bc2096e841f3b262563126feb8a7a4c2b66f090 (diff)
tag date format things
Diffstat (limited to 'tagWindow.go')
-rw-r--r--tagWindow.go19
1 files changed, 10 insertions, 9 deletions
diff --git a/tagWindow.go b/tagWindow.go
index c476f8d..80f14cf 100644
--- a/tagWindow.go
+++ b/tagWindow.go
@@ -90,10 +90,10 @@ func (rs *RepoStatus) makeTagBox(box *gui.Node) {
// git rev-parse HEAD
// if last tag == HEAD, then remove it
- tags := []string{"%(tag)", "%(*objectname)", "%(taggerdate:raw)", "%(subject)", "%(*authorname)", "%(*authoremail)"}
+ tags := []string{"%(objectname)", "%(creatordate)", "%(*authordate)", "%(refname)", "%(subject)"}
format := strings.Join(tags, "_,,,_")
cmd := []string{"git", "for-each-ref", "--sort=taggerdate", "--format", format}
- log.Info("RUNNING:", strings.Join(cmd, " "))
+ // log.Info("RUNNING:", strings.Join(cmd, " "))
err, output := rs.RunCmd(cmd)
if err != nil {
output = "git error_,,,_a_,,,_b_,,,c"
@@ -106,21 +106,22 @@ func (rs *RepoStatus) makeTagBox(box *gui.Node) {
for i, line := range lines {
var parts []string
- parts = make([]string, 6)
+ parts = make([]string, 0)
parts = strings.Split(line, "_,,,_")
- log.Info("found tag:", i, parts)
- if parts[0] == "" {
+ if len(parts) != 5 {
+ log.Info("tag error:", i, parts)
continue
}
+ // log.Info("found tag:", i, parts)
rTag := new(repoTag)
- rTag.tag = grid.NewLabel(parts[0])
- rTag.ref = grid.NewEntrybox(parts[1])
+ rTag.tag = grid.NewLabel(parts[3])
+ rTag.ref = grid.NewEntrybox(parts[0])
- _, stamp, dur := getDateStamp(parts[2]) //
+ _, stamp, dur := getGitDateStamp(parts[1])
rTag.date = grid.NewLabel(stamp)
grid.NewLabel(dur)
- rTag.subject = grid.NewLabel(parts[3])
+ rTag.subject = grid.NewLabel(parts[4])
rTag.deleteB = grid.NewButton("delete", func() {
tagversion := parts[0]
log.Info("remove tag", tagversion)