summaryrefslogtreecommitdiff
path: root/git.go
diff options
context:
space:
mode:
Diffstat (limited to 'git.go')
-rw-r--r--git.go66
1 files changed, 0 insertions, 66 deletions
diff --git a/git.go b/git.go
index 6ab4bbe..e0be1e9 100644
--- a/git.go
+++ b/git.go
@@ -9,34 +9,6 @@ import (
"go.wit.com/log"
)
-/*
-func (rs *RepoStatus) GetCurrentBranchName() string {
- return rs.currentBranch.String()
-}
-
-func (rs *RepoStatus) GetCurrentBranchVersion() string {
- return rs.currentVersion.String()
-}
-
-func (rs *RepoStatus) Age() time.Duration {
- var t *Tag
- t = rs.NewestTag()
-
- if t != nil {
- log.Log(REPO, "newest tag:", t.date.String(), t.tag.String(), t.Name())
- return t.Age()
- }
-
- const gitLayout = "Mon Jan 2 15:04:05 2006 -0700"
- const madeuptime = "Mon Jun 3 15:04:05 2013 -0700"
- tagTime, _ := time.Parse(gitLayout, madeuptime)
- return time.Since(tagTime)
-}
-
-var ErrorMissingGitConfig error = errors.New("missing .git/config")
-var ErrorGitPullOnLocal error = errors.New("git pull on local only branch")
-*/
-
// remove this everything
func (rs *RepoStatus) Path() string {
return rs.realPath.String()
@@ -46,48 +18,10 @@ func (rs *RepoStatus) GitState() string {
return rs.gitState.String()
}
-func (rs *RepoStatus) CheckGitState() string {
- rs.setState()
- return rs.gitState.String()
-}
-
func (rs *RepoStatus) GetStatus() string {
return rs.gitState.String()
}
-func (rs *RepoStatus) setState() {
- pb := rs.pb
- rs.changed = false
- if pb.CheckDirty() {
- log.Log(REPO, "CheckDirty() true")
- rs.gitState.SetText("dirty")
- return
- }
- if pb.GetUserVersion() != pb.GetDevelVersion() {
- rs.gitState.SetText("merge to devel")
- return
- }
- if pb.GetDevelVersion() != pb.GetMasterVersion() {
- rs.gitState.SetText("merge to main")
- return
- }
- if pb.GetLastTag() != pb.GetMasterVersion() {
- rs.gitState.SetText("unchanged")
- return
- }
-
- if pb.CheckBranches() {
- log.Log(REPO, "Branches are Perfect")
- rs.gitState.SetText("PERFECT")
- return
- }
- log.Log(REPO, "FIND THIS IN REPO STATUS Branches are not Perfect")
- log.Log(REPO, "FIND THIS IN REPO STATUS Branches are not Perfect")
- log.Log(REPO, "FIND THIS IN REPO STATUS Branches are not Perfect")
- log.Log(REPO, "FIND THIS IN REPO STATUS Branches are not Perfect")
- rs.gitState.SetText("unknown branches")
-}
-
func (rs *RepoStatus) GetLastTagVersion() string {
return rs.lasttag.String()
}