diff options
| author | Jeff Carr <[email protected]> | 2025-01-07 21:23:21 -0600 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2025-01-07 21:23:21 -0600 |
| commit | 3298e02c2a573b73e7b2413be81d8669eb44f908 (patch) | |
| tree | ddafead0832b0027beb45ab34ef8b87133506753 /reloadRepoState.go | |
| parent | f21c47103214de6e136e97149781fb0ec2e4576b (diff) | |
wow, even a name change is a BAD IDEA. NEVER DO IT
Diffstat (limited to 'reloadRepoState.go')
| -rw-r--r-- | reloadRepoState.go | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/reloadRepoState.go b/reloadRepoState.go new file mode 100644 index 0000000..322c5b0 --- /dev/null +++ b/reloadRepoState.go @@ -0,0 +1,38 @@ +package gitpb + +// does processing on the go.mod and go.sum files + +import ( + "go.wit.com/log" +) + +func (repo *Repo) setRepoState() { + if repo == nil { + return + } + if repo.IsDirty() { + repo.State = "dirty" + return + } + if repo.GetUserVersion() != repo.GetDevelVersion() { + repo.State = "merge to devel" + return + } + if repo.GetDevelVersion() != repo.GetMasterVersion() { + repo.State = "merge to main" + return + } + if repo.GetLastTag() != repo.GetMasterVersion() { + repo.State = "unchanged" + return + } + + if repo.CheckBranches() { + repo.State = "PERFECT" + return + } + log.Info("Branches are not Perfect", repo.GetFullPath()) + log.Info("Branches are not Perfect", repo.GetFullPath()) + log.Info("Branches are not Perfect", repo.GetFullPath()) + repo.State = "unknown branches" +} |
