diff options
| author | Jeff Carr <[email protected]> | 2025-10-05 02:26:38 -0500 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2025-10-05 02:26:38 -0500 |
| commit | ddee08e75db509ee187e5774a05196698c15ff93 (patch) | |
| tree | d872ac04eb5425a7e3372061b799da950f49f8a2 | |
| parent | 0aa1358d85745ee542a29787aa20d35fd2848b2e (diff) | |
rm old junk
| -rw-r--r-- | checkout.go | 4 | ||||
| -rw-r--r-- | currentVersions.go | 4 | ||||
| -rw-r--r-- | reload.go | 7 | ||||
| -rw-r--r-- | reloadRepoState.go | 11 |
4 files changed, 12 insertions, 14 deletions
diff --git a/checkout.go b/checkout.go index 6b6e819..b71fd16 100644 --- a/checkout.go +++ b/checkout.go @@ -48,11 +48,11 @@ func (repo *Repo) CheckoutDevel() bool { func (repo *Repo) CheckoutUser() error { bName := repo.GetUserBranchName() - if bName == "uerr" { + if bName == "" { usr, _ := user.Current() repo.SetUserBranchName(usr.Username) bName = usr.Username - log.Info("gitpb CheckoutUser() somehow got user 'uerr'") + log.Info("gitpb CheckoutUser() user branchname was blank") } return repo.createUserBranch(bName) diff --git a/currentVersions.go b/currentVersions.go index 1360c3c..2b068c7 100644 --- a/currentVersions.go +++ b/currentVersions.go @@ -57,7 +57,7 @@ func (repo *Repo) setUserVersion() { bname := repo.GetUserBranchName() if !repo.Exists(filepath.Join(".git/refs/heads", bname)) { // the user branch does not exist at this time - repo.UserVersion = "uerr" + repo.UserVersion = "" return } v, err := repo.gitVersionByName(bname) @@ -65,7 +65,7 @@ func (repo *Repo) setUserVersion() { repo.UserVersion = v } else { // log.Log(WARN, "gitpb.GitUserVersion() error:", err) - repo.UserVersion = "uerr" + repo.UserVersion = "" } } @@ -70,10 +70,9 @@ func (repo *Repo) ReloadForce() error { repo.reloadMtimes() repo.CheckDirty() - repo.setRepoState() - - // repo.VerifyRemoteAndLocalBranches(repo.GetDevelBranchName()) - // repo.VerifyRemoteAndLocalBranches(repo.GetMasterBranchName()) + if repo.IsDirty() { + repo.State = "dirty" + } // LastUpdate should always be the newest time repo.Times.LastUpdate = timestamppb.New(time.Now()) diff --git a/reloadRepoState.go b/reloadRepoState.go index 923a50f..be1e612 100644 --- a/reloadRepoState.go +++ b/reloadRepoState.go @@ -2,10 +2,8 @@ package gitpb // does processing on the go.mod and go.sum files -import ( - "go.wit.com/log" -) - +/* +// this is old crap that can finally be deprecated now that everything is protobuf func (repo *Repo) setRepoState() { if repo == nil { return @@ -14,8 +12,8 @@ func (repo *Repo) setRepoState() { repo.State = "dirty" return } - if repo.GetUserVersion() == "uerr" { - // user has not made user branches + if repo.GetUserVersion() == "" { + // user has not set user branch name } else { if repo.GetUserVersion() != repo.GetDevelVersion() { repo.State = "merge to devel" @@ -58,6 +56,7 @@ func (repo *Repo) setRepoState() { } repo.State = "PERFECT" } +*/ // returns true if old="v0.2.4" and new="v0.3.3" // returns true if equal |
