summaryrefslogtreecommitdiff
path: root/doFix.deleteuser.go
diff options
context:
space:
mode:
Diffstat (limited to 'doFix.deleteuser.go')
-rw-r--r--doFix.deleteuser.go22
1 files changed, 11 insertions, 11 deletions
diff --git a/doFix.deleteuser.go b/doFix.deleteuser.go
index f9878d4..da8bb11 100644
--- a/doFix.deleteuser.go
+++ b/doFix.deleteuser.go
@@ -58,12 +58,12 @@ func doFixPrint(s string, path string, cmd string) {
log.Printf("%-13.13s %-55.55s %s\n", s, path, cmd)
}
-func doFixDeleteUserBranches(repo *gitpb.Repo, remoteRef *gitpb.GitTag) *notesList {
+func doFixDeleteUserBranches(repo *gitpb.Repo, remoteRef *gitpb.Stat) *notesList {
// log.Info("delete remote user", repo.FullPath)
localTag := repo.IsBranchLocal(repo.GetUserBranchName())
if localTag != nil {
- // log.Info("THERE IS local user", repo.FullPath, localTag.Refname)
- doFixPrint("LOCAL USER", repo.FullPath, localTag.Refname+" local branch exists")
+ // log.Info("THERE IS local user", repo.FullPath, localTag.Name)
+ doFixPrint("LOCAL USER", repo.FullPath, localTag.Name+" local branch exists")
err, notes := doFixDeleteUserLocalBranch(repo, remoteRef, localTag)
if err != nil {
log.Printf("%-13.13s %-55.55s %v noteslen(%d)\n", "need --fix", repo.FullPath, err, len(notes.all))
@@ -77,10 +77,10 @@ func doFixDeleteUserBranches(repo *gitpb.Repo, remoteRef *gitpb.GitTag) *notesLi
}
// notes.addNote("SAFE", repo, remoteUser, line)
-func (notes *notesList) addNote(note string, repo *gitpb.Repo, ref *gitpb.GitTag, cmd []string, line string) {
+func (notes *notesList) addNote(note string, repo *gitpb.Repo, ref *gitpb.Stat, cmd []string, line string) {
newnote := new(DeleteBranchNotes)
newnote.Note = note
- newnote.Refname = ref.Refname
+ newnote.Name = ref.Name
newnote.Fullpath = repo.FullPath
newnote.Cmd = cmd
parts := strings.Split(line, "%00") // git log doesn't actually convert %00 to NULL
@@ -100,7 +100,7 @@ func (notes *notesList) addNote(note string, repo *gitpb.Repo, ref *gitpb.GitTag
func (notes *notesList) addTextNote(note string, repo *gitpb.Repo, refname string, cmd []string, line string) {
newnote := new(DeleteBranchNotes)
newnote.Note = note
- newnote.Refname = refname
+ newnote.Name = refname
newnote.Fullpath = repo.FullPath
newnote.Cmd = cmd
parts := strings.Split(line, "%00") // git log doesn't actually convert %00 to NULL
@@ -123,7 +123,7 @@ type notesList struct {
type DeleteBranchNotes struct {
Note string
- Refname string
+ Name string
Fullpath string
Cmd []string
// git log variable names
@@ -135,7 +135,7 @@ type DeleteBranchNotes struct {
// git branch -D refs/heads/jcarr
// git update-ref -d refs/heads/jcarr
-func doFixDeleteUserLocalBranch(repo *gitpb.Repo, remoteRef *gitpb.GitTag, localRef *gitpb.GitTag) (error, *notesList) {
+func doFixDeleteUserLocalBranch(repo *gitpb.Repo, remoteRef *gitpb.Stat, localRef *gitpb.Stat) (error, *notesList) {
notes := new(notesList)
// get local user, remote user & local devel branches
@@ -209,7 +209,7 @@ func doFixDeleteUserLocalBranch(repo *gitpb.Repo, remoteRef *gitpb.GitTag, local
// git push --delete origin jcarr
// git push origin :refs/remotes/origin/jcarr
-func doFixDeleteRemoteUserBranch(repo *gitpb.Repo, remoteRef *gitpb.GitTag) (error, *notesList) {
+func doFixDeleteRemoteUserBranch(repo *gitpb.Repo, remoteRef *gitpb.Stat) (error, *notesList) {
notes := new(notesList)
// get remote user & local devel branches
@@ -250,7 +250,7 @@ func doFixDeleteRemoteUserBranch(repo *gitpb.Repo, remoteRef *gitpb.GitTag) (err
}
// deletes local user branch if it's entirely in devel
-func doFixDeleteLocalUserByDevel(repo *gitpb.Repo, localRef *gitpb.GitTag) (error, *notesList) {
+func doFixDeleteLocalUserByDevel(repo *gitpb.Repo, localRef *gitpb.Stat) (error, *notesList) {
notes := new(notesList)
localUser := repo.NewCompareRef(localRef)
@@ -292,7 +292,7 @@ func doFixDeleteLocalUserByDevel(repo *gitpb.Repo, localRef *gitpb.GitTag) (erro
}
// deletes local user branch if it's entirely in master
-func doFixDeleteLocalUserByMaster(repo *gitpb.Repo, localRef *gitpb.GitTag) (error, *notesList) {
+func doFixDeleteLocalUserByMaster(repo *gitpb.Repo, localRef *gitpb.Stat) (error, *notesList) {
notes := new(notesList)
localUser := repo.NewCompareRef(localRef)