cleanup tag list
This commit is contained in:
parent
a9c4b21b35
commit
e300719241
14
argv.go
14
argv.go
|
@ -155,7 +155,7 @@ func DoAutoComplete(pb *prep.Auto) {
|
||||||
case "checkout":
|
case "checkout":
|
||||||
pb.Autocomplete2("devel master user")
|
pb.Autocomplete2("devel master user")
|
||||||
case "clean":
|
case "clean":
|
||||||
fmt.Println("--force verify --repo")
|
pb.Autocomplete2("")
|
||||||
case "commit":
|
case "commit":
|
||||||
pb.Autocomplete2("--all")
|
pb.Autocomplete2("--all")
|
||||||
case "config":
|
case "config":
|
||||||
|
@ -171,19 +171,11 @@ func DoAutoComplete(pb *prep.Auto) {
|
||||||
case "merge":
|
case "merge":
|
||||||
pb.Autocomplete2("devel master --all")
|
pb.Autocomplete2("devel master --all")
|
||||||
case "normal":
|
case "normal":
|
||||||
fmt.Println("on off")
|
pb.Autocomplete2("on off")
|
||||||
case "pull":
|
case "pull":
|
||||||
fmt.Println("--force check")
|
pb.Autocomplete2("--force check")
|
||||||
case "patch":
|
case "patch":
|
||||||
fmt.Println("check get list repos submit show")
|
fmt.Println("check get list repos submit show")
|
||||||
case "user":
|
|
||||||
fmt.Println("--force")
|
|
||||||
case "devel":
|
|
||||||
fmt.Println("--force")
|
|
||||||
case "master":
|
|
||||||
fmt.Println("")
|
|
||||||
case "verify":
|
|
||||||
fmt.Println("user devel master")
|
|
||||||
case "tag":
|
case "tag":
|
||||||
fmt.Println("list --delete clean")
|
fmt.Println("list --delete clean")
|
||||||
default:
|
default:
|
||||||
|
|
40
doTag.go
40
doTag.go
|
@ -39,7 +39,7 @@ func doTag() error {
|
||||||
if argv.Tag.List != nil {
|
if argv.Tag.List != nil {
|
||||||
repo := findCurrentPwdRepoOrDie()
|
repo := findCurrentPwdRepoOrDie()
|
||||||
|
|
||||||
tagTablePB := makeTagTablePB(repo.Tags)
|
tagTablePB := makeTagTablePB(repo, repo.Tags)
|
||||||
// tbox := win.Bottom.Box().SetProgName("TBOX")
|
// tbox := win.Bottom.Box().SetProgName("TBOX")
|
||||||
// t.SetParent(tbox)
|
// t.SetParent(tbox)
|
||||||
tagTablePB.MakeTable()
|
tagTablePB.MakeTable()
|
||||||
|
@ -80,40 +80,46 @@ func doTag() error {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func makeTagTablePB(pb *gitpb.GitTags) *gitpb.GitTagsTable {
|
func makeTagTablePB(repo *gitpb.Repo, pb *gitpb.GitTags) *gitpb.GitTagsTable {
|
||||||
t := pb.NewTable("tagList")
|
t := pb.NewTable("tagList")
|
||||||
t.NewUuid()
|
t.NewUuid()
|
||||||
|
|
||||||
col := t.AddHash()
|
col := t.AddHash()
|
||||||
col.Width = 12
|
col.Width = 12
|
||||||
|
|
||||||
col = t.AddStringFunc("Ref Name", func(r *gitpb.GitTag) string {
|
col = t.AddStringFunc("bashash", func(tag *gitpb.GitTag) string {
|
||||||
_, ref := filepath.Split(r.GetRefname())
|
_, base := filepath.Split(tag.Refname)
|
||||||
return ref
|
cmd, err := repo.RunStrict([]string{"git", "log", "-1", base, "--format=%H"})
|
||||||
|
if err != nil {
|
||||||
|
return "err"
|
||||||
|
}
|
||||||
|
if len(cmd.Stdout) == 0 {
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
return cmd.Stdout[0]
|
||||||
})
|
})
|
||||||
col.Width = 16
|
col.Width = 12
|
||||||
// col.Width = -1
|
|
||||||
|
|
||||||
col = t.AddTimeFunc("age", func(repo *gitpb.GitTag) time.Time {
|
|
||||||
// todo
|
|
||||||
return time.Now()
|
|
||||||
})
|
|
||||||
col.Width = 6
|
|
||||||
|
|
||||||
col = t.AddTimeFunc("ctime", func(tag *gitpb.GitTag) time.Time {
|
col = t.AddTimeFunc("ctime", func(tag *gitpb.GitTag) time.Time {
|
||||||
// todo
|
// todo
|
||||||
return tag.Creatordate.AsTime()
|
return tag.Creatordate.AsTime()
|
||||||
})
|
})
|
||||||
col.Width = 16
|
col.Width = 4
|
||||||
|
|
||||||
col = t.AddIntFunc("int", func(tag *gitpb.GitTag) int {
|
col = t.AddTimeFunc("age", func(repo *gitpb.GitTag) time.Time {
|
||||||
// todo
|
// todo
|
||||||
return 3
|
return time.Now()
|
||||||
})
|
})
|
||||||
col.Width = 4
|
col.Width = 4
|
||||||
|
|
||||||
col = t.AddSubject()
|
col = t.AddStringFunc("Ref Name", func(r *gitpb.GitTag) string {
|
||||||
|
_, ref := filepath.Split(r.GetRefname())
|
||||||
|
return ref
|
||||||
|
})
|
||||||
col.Width = 16
|
col.Width = 16
|
||||||
|
|
||||||
|
col = t.AddSubject()
|
||||||
|
col.Width = -1
|
||||||
|
|
||||||
return t
|
return t
|
||||||
}
|
}
|
||||||
|
|
61
doc.go
61
doc.go
|
@ -1,40 +1,41 @@
|
||||||
/*
|
/*
|
||||||
|
|
||||||
forge -- a tool to manage lots of git repos. forge includes a GUI and TUI.
|
forge -- a tool to manage lots of git repos. forge includes a GUI and TUI.
|
||||||
|
|
||||||
forge only executes the 'git' command. Everything it does, you can run by hand with 'git'.
|
forge only executes the 'git' command. Everything it does, you can run by hand with 'git'.
|
||||||
|
|
||||||
Options:
|
Options:
|
||||||
--debugger open the debugger window
|
|
||||||
--logger open the log.* control window
|
--debugger open the debugger window
|
||||||
--gui GUI select the plugin (andlabs,gocui,etc)
|
--logger open the log.* control window
|
||||||
--gui-verbose enable all logging
|
--gui GUI select the plugin (andlabs,gocui,etc)
|
||||||
--bash generate bash completion
|
--gui-verbose enable all logging
|
||||||
--bash generate bash completion
|
--bash generate bash completion
|
||||||
--connect CONNECT forge url
|
--bash generate bash completion
|
||||||
--all git commit --all
|
--connect CONNECT forge url
|
||||||
--build BUILD build a repo
|
--all git commit --all
|
||||||
--install INSTALL install a repo
|
--build BUILD build a repo
|
||||||
--forge-rebuild download and rebuild forge
|
--install INSTALL install a repo
|
||||||
--force try to strong arm things
|
--forge-rebuild download and rebuild forge
|
||||||
--verbose show more output
|
--force try to strong arm things
|
||||||
--help, -h display this help and exit
|
--verbose show more output
|
||||||
--version display version and exit
|
--help, -h display this help and exit
|
||||||
|
--version display version and exit
|
||||||
|
|
||||||
Commands:
|
Commands:
|
||||||
help New to forge? This is for you.'
|
|
||||||
checkout switch branches using 'git checkout'
|
help New to forge? This is for you.'
|
||||||
clean start over at the beginning
|
checkout switch branches using 'git checkout'
|
||||||
commit 'git commit' but errors out if on wrong branch
|
clean start over at the beginning
|
||||||
config show your .config/forge/ settings
|
commit 'git commit' but errors out if on wrong branch
|
||||||
dirty show dirty git repos
|
config show your .config/forge/ settings
|
||||||
fetch run 'git fetch master'
|
dirty show dirty git repos
|
||||||
gui open the gui
|
fetch run 'git fetch master'
|
||||||
list print a table of the current repos
|
gui open the gui
|
||||||
merge merge branches
|
list print a table of the current repos
|
||||||
normal set every repo to the default state for software development
|
merge merge branches
|
||||||
patch make patchsets
|
normal set every repo to the default state for software development
|
||||||
pull run 'git pull'
|
patch make patchsets
|
||||||
tag manage git tags
|
pull run 'git pull'
|
||||||
|
tag manage git tags
|
||||||
*/
|
*/
|
||||||
package main
|
package main
|
||||||
|
|
Loading…
Reference in New Issue