From 692264d1f1d11432ea589dc00db11096280d21ba Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Fri, 12 Sep 2025 10:17:03 -0500 Subject: [PATCH] reorder the 'end' var --- humanTable.go | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/humanTable.go b/humanTable.go index db41609..ea2ce59 100644 --- a/humanTable.go +++ b/humanTable.go @@ -188,6 +188,21 @@ func (f *Forge) printRepoToTable(repo *gitpb.Repo, sizes []int, full bool) { } } + switch repo.GetState() { + case "PERFECT": + case "unchanged": + case "dirty": + case "unknown branches": + if repo.CurrentTag == nil { + end += "(" + repo.GetState() + ") " + } else { + end += "(unknown branch " + repo.CurrentTag.Refname + ") " + } + // end += "(invalid tag) " + default: + end += "(" + repo.GetState() + ") " + } + if repo.GetMasterBranchName() != "master" && repo.GetMasterBranchName() != "main" { end += "(m:" + repo.GetMasterBranchName() + ") " } @@ -205,21 +220,6 @@ func (f *Forge) printRepoToTable(repo *gitpb.Repo, sizes []int, full bool) { end += "(deb:" + debname + ") " } - switch repo.GetState() { - case "PERFECT": - case "unchanged": - case "dirty": - case "unknown branches": - if repo.CurrentTag == nil { - end += "(" + repo.GetState() + ") " - } else { - end += "(unknown branch " + repo.CurrentTag.Refname + ") " - } - // end += "(invalid tag) " - default: - end += "(" + repo.GetState() + ") " - } - log.Info(cobol.TerminalChomp(start + " " + end)) }