more git change tracking

Signed-off-by: Jeff Carr <jcarr@wit.com>
This commit is contained in:
Jeff Carr 2024-01-18 17:37:50 -06:00
parent 8e9e19a14f
commit db3d481c5f
3 changed files with 6 additions and 1 deletions

View File

@ -271,6 +271,7 @@ func (rs *RepoStatus) recommend() {
rs.incrementVersion() rs.incrementVersion()
rs.EnableSelectTag() rs.EnableSelectTag()
rs.setTag() rs.setTag()
rs.versionMessage.SetText("TODO: set globally")
return return
} }
log.Warn("Is repo pushed upstream? git.wit.org or github?") log.Warn("Is repo pushed upstream? git.wit.org or github?")

4
git.go
View File

@ -206,6 +206,7 @@ func (rs *RepoStatus) GetUserVersion() string {
return name return name
} }
// TODO: make this report the error somewhere
func (rs *RepoStatus) CheckBranches() bool { func (rs *RepoStatus) CheckBranches() bool {
var hashCheck string var hashCheck string
var perfect bool = true var perfect bool = true
@ -243,7 +244,8 @@ func (rs *RepoStatus) CheckBranches() bool {
if hash == hashCheck { if hash == hashCheck {
log.Warn(hash, output, b) log.Warn(hash, output, b)
} else { } else {
log.Warn(hash, output, b, "NOT THE SAME") log.Warn("UNKNOWN BRANCHES IN THIS REPO")
rs.versionMessage.SetText("UNKNOWN BRANCHES")
perfect = false perfect = false
parts := strings.Split(b, "/") parts := strings.Split(b, "/")
log.Warn("git push", parts) log.Warn("git push", parts)

View File

@ -35,6 +35,7 @@ func (rs *RepoStatus) Update() {
if rs.dirtyLabel.String() != "no" { if rs.dirtyLabel.String() != "no" {
log.Warn("dirty label != no. actual value:", rs.dirtyLabel.String()) log.Warn("dirty label != no. actual value:", rs.dirtyLabel.String())
rs.DisableEverything() rs.DisableEverything()
rs.CheckBranches()
return return
} }
@ -54,6 +55,7 @@ func (rs *RepoStatus) Update() {
rs.checkoutBranch("user", user) rs.checkoutBranch("user", user)
rs.recommend() rs.recommend()
rs.CheckBranches()
}) })
rs.setSpeed(duration) rs.setSpeed(duration)
log.Log(WARN, "Update() END") log.Log(WARN, "Update() END")