diff options
Diffstat (limited to 'git.go')
| -rw-r--r-- | git.go | 26 |
1 files changed, 19 insertions, 7 deletions
@@ -12,12 +12,24 @@ import ( ) func (r *repo) checkoutBranch(branch string) { - if ! r.checkDirty() { - out := run(r.path, "git", "checkout " + branch) - log.Warn(r.path, "git checkout " + branch, "returned", out) + if r.checkDirty() { + return + } + out := run(r.path, "git", "checkout " + branch) + log.Warn(r.path, "git checkout " + branch, "returned", out) + + realname := r.getCurrentBranchName() + realversion := r.getCurrentBranchVersion() + log.Warn(r.path, "realname =", realname, "realversion =", realversion) + if realname == "jcarr" { + r.jcarrVersion.Set(realversion) + } + if realname == "devel" { + r.develVersion.Set(realversion) + } + if realname == "master" { + r.masterVersion.Set(realversion) } - r.getCurrentBranchName() - r.getCurrentBranchVersion() } func (r *repo) getBranch() { @@ -28,11 +40,11 @@ func (r *repo) getBranch() { func (r *repo) checkDirty() bool { out := run(r.path, "git", "diff-index HEAD") if out == "" { - r.sLabel.SetText("") + r.dirtyLabel.SetText("") r.pButton.Disable() return false } else { - r.sLabel.SetText("dirty") + r.dirtyLabel.SetText("dirty") r.pButton.Enable() return true } |
