summaryrefslogtreecommitdiff
path: root/git.go
diff options
context:
space:
mode:
Diffstat (limited to 'git.go')
-rw-r--r--git.go9
1 files changed, 4 insertions, 5 deletions
diff --git a/git.go b/git.go
index 3b66d9d..b0963c7 100644
--- a/git.go
+++ b/git.go
@@ -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
}