diff options
Diffstat (limited to 'git.go')
| -rw-r--r-- | git.go | 9 |
1 files changed, 4 insertions, 5 deletions
@@ -44,6 +44,7 @@ func (rs *RepoStatus) Path() string { return rs.realPath.String() } +/* func (rs *RepoStatus) checkoutBranch(level string, branch string) { if rs.CheckDirty() { log.Log(REPO, "checkoutBranch() checkDirty() == true for repo", rs.realPath.String(), "looking for branch:", branch) @@ -66,6 +67,7 @@ func (rs *RepoStatus) checkoutBranch(level string, branch string) { default: } } +*/ func (rs *RepoStatus) GitState() string { return rs.gitState.String() @@ -126,7 +128,7 @@ func (rs *RepoStatus) displayCurrentBranchName() string { // stores the current branch name func (rs *RepoStatus) checkCurrentBranchName() string { currentname := rs.currentBranch.String() - out := run(rs.realPath.String(), "git", "branch --show-current") + out := rs.pb.GetCurrentBranchName() if currentname == out { // nothing changed return currentname @@ -189,10 +191,7 @@ func (rs *RepoStatus) checkCurrentBranchVersion() string { // this should get the most recent tag func (rs *RepoStatus) setLastTagVersion() { - hash := run(rs.realPath.String(), "git", "rev-list --tags --max-count=1") - log.Log(REPO, "getLastTagVersion()", hash) - - name, _ := rs.gitDescribeByHash(hash) + name := rs.pb.GetLastTagVersion() rs.lasttag.SetText(name) return } |
