repostatus/git.go

43 lines
967 B
Go

package repostatus
// most everything here needs to be deprecated now
func (rs *RepoStatus) Path() string {
return rs.realPath.String()
}
/*
func (rs *RepoStatus) GitState() string {
return rs.gitState.String()
}
*/
func (rs *RepoStatus) GetStatus() string {
return rs.gitState.String()
}
func (rs *RepoStatus) GetLastTagVersion() string {
return rs.lasttag.String()
}
func (rs *RepoStatus) displayCurrentBranchName() string {
out := rs.pb.GetCurrentBranchName()
rs.currentBranch.SetValue(out)
return out
}
// stores the current branch name
func (rs *RepoStatus) checkCurrentBranchName() string {
currentname := rs.currentBranch.String()
out := rs.pb.GetCurrentBranchName()
if currentname == out {
// nothing changed
return currentname
}
rs.currentBranch.SetValue(out)
if currentname == "" {
return out // don't note if there was nothing before
}
rs.NoteChange("current branch has changed from " + currentname + " to " + out)
return out
}