actually create the user branches
This commit is contained in:
parent
70e8c98b1c
commit
5aaf02ee3a
6
git.go
6
git.go
|
@ -4,7 +4,6 @@ import (
|
|||
"errors"
|
||||
"os/user"
|
||||
"strings"
|
||||
"time"
|
||||
"unicode/utf8"
|
||||
|
||||
"io/ioutil"
|
||||
|
@ -20,9 +19,12 @@ func (rs *RepoStatus) GetCurrentBranchVersion() string {
|
|||
return rs.currentVersion.String()
|
||||
}
|
||||
|
||||
/*
|
||||
// this isn't right
|
||||
func (rs *RepoStatus) LastTagAge() (time.Time, string) {
|
||||
return time.Now(), rs.lasttag.String()
|
||||
}
|
||||
*/
|
||||
|
||||
func (rs *RepoStatus) GetLastTagVersion() string {
|
||||
return rs.lasttag.String()
|
||||
|
@ -181,7 +183,7 @@ func (rs *RepoStatus) CheckDirty() bool {
|
|||
func (rs *RepoStatus) CheckoutBranch(bname string) bool {
|
||||
if rs.CheckDirty() {
|
||||
log.Log(INFO, rs.realPath.String(), "is dirty")
|
||||
log.Info("bname is dirty", bname, rs.Path())
|
||||
log.Info(bname, "is dirty", rs.Path())
|
||||
return false
|
||||
}
|
||||
if !rs.TagExists(bname) {
|
||||
|
|
|
@ -249,3 +249,12 @@ func (rs *RepoStatus) processBranch(branch string) {
|
|||
rs.gitConfig.versions[newhash] = name
|
||||
log.Log(INFO, " hash: version", name)
|
||||
}
|
||||
|
||||
func (rs *RepoStatus) BranchExists(branch string) bool {
|
||||
hash, ok := rs.gitConfig.hashes[branch]
|
||||
if ok {
|
||||
log.Log(REPOWARN, rs.Path(), "found branch", branch, hash)
|
||||
return true
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue