summaryrefslogtreecommitdiff
path: root/update.go
diff options
context:
space:
mode:
Diffstat (limited to 'update.go')
-rw-r--r--update.go13
1 files changed, 3 insertions, 10 deletions
diff --git a/update.go b/update.go
index 99b17cb..81a604e 100644
--- a/update.go
+++ b/update.go
@@ -3,28 +3,21 @@ package repostatus
import (
"errors"
"fmt"
- "strings"
"time"
"go.wit.com/log"
)
func (rs *RepoStatus) gitBranchAll() {
- err, out := rs.RunCmd([]string{"git", "branch", "--all"})
- log.Log(WARN, "git branch failed string =", rs.String())
- log.Log(WARN, "git branch failed realpath =", rs.realPath.String())
- if err != nil {
+ r := rs.Run([]string{"git", "branch", "--all"})
+ if r.Error != nil {
log.Log(WARN, "git branch failed string =", rs.String())
log.Log(WARN, "git branch failed realpath =", rs.realPath.String())
return
}
- all := strings.Split(out, "\n")
- for _, s := range all {
- // log.Log(WARN, "found branch", i, s)
+ for _, s := range r.Stdout {
rs.targetBranch.AddText(s)
}
- // i := len(all)
- // log.Log(WARN, "branch count =", i)
}
func (rs *RepoStatus) updateNew() {