summaryrefslogtreecommitdiff
path: root/compare.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2025-11-05 15:29:40 -0600
committerJeff Carr <[email protected]>2025-11-05 15:29:40 -0600
commit12b751cc7fbaa09f205c6207c355300f15885441 (patch)
treed1ba97cbdc5f6d9c86d94206dc89eb1c878f7c97 /compare.go
parentb7efa450a8a220625174f21ae15f9b7ea1cd3a3b (diff)
compiles against stat.protov0.0.182
Diffstat (limited to 'compare.go')
-rw-r--r--compare.go44
1 files changed, 22 insertions, 22 deletions
diff --git a/compare.go b/compare.go
index 9e0d6b3..30b9cd3 100644
--- a/compare.go
+++ b/compare.go
@@ -10,7 +10,7 @@ import (
type RepoTag struct {
r *Repo
- t *GitTag
+ t *Stat
}
func (r *Repo) NewCompareTag(refname string) *RepoTag {
@@ -24,7 +24,7 @@ func (r *Repo) NewCompareTag(refname string) *RepoTag {
return rt
}
-func (r *Repo) NewCompareRef(t *GitTag) *RepoTag {
+func (r *Repo) NewCompareRef(t *Stat) *RepoTag {
if t == nil {
return nil
}
@@ -35,24 +35,24 @@ func (r *Repo) NewCompareRef(t *GitTag) *RepoTag {
}
func (rt *RepoTag) GetRefname() string {
- return rt.t.Refname
+ return rt.t.Name
}
-func (rt *RepoTag) GetRef() *GitTag {
+func (rt *RepoTag) GetRef() *Stat {
return rt.t
}
func (t1 *RepoTag) CompareBranch(t2 *RepoTag) ([]string, []string, []string, []string, error) {
- lines1, cmd1, err1 := t1.r.CountDiffObjectsNEWNEW(t1.t.Refname, t2.t.Refname)
- // log.Info("lessthan", t1.t.Refname, t2.t.Refname, count, t1.r.FullPath)
+ lines1, cmd1, err1 := t1.r.CountDiffObjectsNEWNEW(t1.t.Name, t2.t.Name)
+ // log.Info("lessthan", t1.t.Name, t2.t.Name, count, t1.r.FullPath)
if err1 != nil {
- // log.Info("lessthan", t1.t.Refname, t2.t.Refname, count, t1.r.FullPath, err)
+ // log.Info("lessthan", t1.t.Name, t2.t.Name, count, t1.r.FullPath, err)
return nil, nil, cmd1, nil, err1
}
- lines2, cmd2, err2 := t1.r.CountDiffObjectsNEWNEW(t2.t.Refname, t1.t.Refname)
- // log.Info("lessthan", t1.t.Refname, t2.t.Refname, count, t1.r.FullPath)
+ lines2, cmd2, err2 := t1.r.CountDiffObjectsNEWNEW(t2.t.Name, t1.t.Name)
+ // log.Info("lessthan", t1.t.Name, t2.t.Name, count, t1.r.FullPath)
if err2 != nil {
- // log.Info("lessthan", t1.t.Refname, t2.t.Refname, count, t1.r.FullPath, err)
+ // log.Info("lessthan", t1.t.Name, t2.t.Name, count, t1.r.FullPath, err)
return nil, nil, cmd1, cmd2, err2
}
if (len(lines1) != 0) || (len(lines2) != 0) {
@@ -63,15 +63,15 @@ func (t1 *RepoTag) CompareBranch(t2 *RepoTag) ([]string, []string, []string, []s
func (r *Repo) CompareHashes(keepHash string, deleteHash string) ([]string, []string, []string, []string, error) {
lines1, cmd1, err1 := r.CountDiffObjectsNEWNEW(keepHash, deleteHash)
- // log.Info("lessthan", t1.t.Refname, t2.t.Refname, count, t1.r.FullPath)
+ // log.Info("lessthan", t1.t.Name, t2.t.Name, count, t1.r.FullPath)
if err1 != nil {
- // log.Info("lessthan", t1.t.Refname, t2.t.Refname, count, t1.r.FullPath, err)
+ // log.Info("lessthan", t1.t.Name, t2.t.Name, count, t1.r.FullPath, err)
return nil, nil, cmd1, nil, err1
}
lines2, cmd2, err2 := r.CountDiffObjectsNEWNEW(deleteHash, keepHash)
- // log.Info("lessthan", t1.t.Refname, t2.t.Refname, count, t1.r.FullPath)
+ // log.Info("lessthan", t1.t.Name, t2.t.Name, count, t1.r.FullPath)
if err2 != nil {
- // log.Info("lessthan", t1.t.Refname, t2.t.Refname, count, t1.r.FullPath, err)
+ // log.Info("lessthan", t1.t.Name, t2.t.Name, count, t1.r.FullPath, err)
return nil, nil, cmd1, cmd2, err2
}
if (len(lines1) != 0) || (len(lines2) != 0) {
@@ -82,10 +82,10 @@ func (r *Repo) CompareHashes(keepHash string, deleteHash string) ([]string, []st
/*
func (t1 *RepoTag) LessThanVerbose(t2 *RepoTag) []string {
- count, err := t1.r.CountDiffObjectsNew(t1.t.Refname, t2.t.Refname)
- log.Info("lessthan", t1.t.Refname, t2.t.Refname, len(count), t1.r.FullPath)
+ count, err := t1.r.CountDiffObjectsNew(t1.t.Name, t2.t.Name)
+ log.Info("lessthan", t1.t.Name, t2.t.Name, len(count), t1.r.FullPath)
if err != nil {
- log.Info("lessthan", t1.t.Refname, t2.t.Refname, len(count), t1.r.FullPath, err)
+ log.Info("lessthan", t1.t.Name, t2.t.Name, len(count), t1.r.FullPath, err)
return nil
}
if len(count) == 0 {
@@ -101,8 +101,8 @@ func (t1 *RepoTag) Equal(t2 *RepoTag) bool {
// if t1 is user branch, and t2 is devel branch, true if 0
func (t1 *RepoTag) GreaterThan(t2 *RepoTag) []string {
- lines, _, err := t1.r.CountDiffObjectsNEWNEW(t2.t.Refname, t1.t.Refname)
- // log.Info("greaterthan", t1.t.Refname, t2.t.Refname, count, t1.r.FullPath, err)
+ lines, _, err := t1.r.CountDiffObjectsNEWNEW(t2.t.Name, t1.t.Name)
+ // log.Info("greaterthan", t1.t.Name, t2.t.Name, count, t1.r.FullPath, err)
if err != nil {
return nil
}
@@ -112,15 +112,15 @@ func (t1 *RepoTag) GreaterThan(t2 *RepoTag) []string {
return nil
}
-func (r *Repo) GetLocalUserRef() *GitTag {
+func (r *Repo) GetLocalUserRef() *Stat {
return r.IsBranchLocal(r.GetUserBranchName())
}
-func (r *Repo) GetLocalDevelRef() *GitTag {
+func (r *Repo) GetLocalDevelRef() *Stat {
return r.IsBranchLocal(r.GetDevelBranchName())
}
-func (r *Repo) GetLocalMasterRef() *GitTag {
+func (r *Repo) GetLocalMasterRef() *Stat {
return r.IsBranchLocal(r.GetMasterBranchName())
}