need better handling here
This commit is contained in:
parent
b770759167
commit
52b8a4e312
|
@ -181,6 +181,12 @@ func (f *Forge) printRepoToTable(repo *gitpb.Repo) {
|
||||||
// age := shell.FormatDuration(time.Since(ctime))
|
// age := shell.FormatDuration(time.Since(ctime))
|
||||||
age := shell.FormatDuration(repo.BranchAge(cname))
|
age := shell.FormatDuration(repo.BranchAge(cname))
|
||||||
|
|
||||||
|
if f.Config.IsReadOnly(repo.GetGoPath()) {
|
||||||
|
// end += "(readonly) "
|
||||||
|
} else {
|
||||||
|
end += "(rw) "
|
||||||
|
}
|
||||||
|
|
||||||
if repo.IsDirty() {
|
if repo.IsDirty() {
|
||||||
age = ""
|
age = ""
|
||||||
end += "(dirty) "
|
end += "(dirty) "
|
||||||
|
@ -188,9 +194,12 @@ func (f *Forge) printRepoToTable(repo *gitpb.Repo) {
|
||||||
|
|
||||||
start := standardTable8(gopath, cname, age, mhort, dhort, uhort, chort, thort, rtype)
|
start := standardTable8(gopath, cname, age, mhort, dhort, uhort, chort, thort, rtype)
|
||||||
|
|
||||||
if f.Config.IsReadOnly(repo.GetGoPath()) {
|
if rtype == "protobuf" {
|
||||||
end += "(readonly) "
|
if repo.GoInfo.GoBinary {
|
||||||
|
end += "(binary) "
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if repo.GetMasterBranchName() != "master" && repo.GetMasterBranchName() != "main" {
|
if repo.GetMasterBranchName() != "master" && repo.GetMasterBranchName() != "main" {
|
||||||
end += "(m:" + repo.GetMasterBranchName() + ") "
|
end += "(m:" + repo.GetMasterBranchName() + ") "
|
||||||
}
|
}
|
||||||
|
@ -211,6 +220,7 @@ func (f *Forge) printRepoToTable(repo *gitpb.Repo) {
|
||||||
switch repo.GetState() {
|
switch repo.GetState() {
|
||||||
case "PERFECT":
|
case "PERFECT":
|
||||||
case "unchanged":
|
case "unchanged":
|
||||||
|
case "dirty":
|
||||||
case "unknown branches":
|
case "unknown branches":
|
||||||
if repo.CurrentTag == nil {
|
if repo.CurrentTag == nil {
|
||||||
end += "(" + repo.GetState() + ") "
|
end += "(" + repo.GetState() + ") "
|
||||||
|
|
Loading…
Reference in New Issue