summaryrefslogtreecommitdiff
path: root/doFix.deleteuser.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2025-10-15 02:03:56 -0500
committerJeff Carr <[email protected]>2025-10-15 02:03:56 -0500
commit63f9f0b4724f0751ef07bd3ebf1432c87fd5957b (patch)
treec843bef0f2c0837dd163aaeb2d444ba697dd7990 /doFix.deleteuser.go
parentf39e5a1a15cb6f30ab6c100842e85dc73b23f4df (diff)
compiles and runs okay
Diffstat (limited to 'doFix.deleteuser.go')
-rw-r--r--doFix.deleteuser.go23
1 files changed, 11 insertions, 12 deletions
diff --git a/doFix.deleteuser.go b/doFix.deleteuser.go
index 991f886..6247be5 100644
--- a/doFix.deleteuser.go
+++ b/doFix.deleteuser.go
@@ -42,7 +42,11 @@ func doDeleteUser() (string, error) {
continue
}
}
- doFixDeleteUserBranches(repo, uremoteref)
+ err := doFixDeleteUserBranches(repo, uremoteref)
+ if err == nil {
+ return "might have worked?", nil
+ }
+ log.Info("doFixDeleteUserBranches() probably didn't delete it either", err)
}
me.forge.PrintHumanTable(found)
return "TODO: CHECK git patchId to verify these", nil
@@ -334,8 +338,6 @@ func doFixDeleteLocalUserByMaster(repo *gitpb.Repo, localRef *gitpb.GitTag) (err
// todo: these names are all horrible
// delete localRef if it's completely contained in the masterRef
func safeDelete(repo *gitpb.Repo, deleteHash string, keepHash string) error {
- notes := new(notesList)
-
// compare the branches
hashok, hashbad, cmd1, cmd2, err := repo.CompareHashes(keepHash, deleteHash)
@@ -348,20 +350,17 @@ func safeDelete(repo *gitpb.Repo, deleteHash string, keepHash string) error {
// things only in the master branch (safe to ignore)
for _, line := range hashok {
- notes.addTextNote("OK", repo, "in keepHash", cmd1, line)
+ parts := strings.Split(line, "%00") // git log doesn't actually convert %00 to NULL
+ log.Printf("%-13.13s %-55.55s %v\n", "OK delete", repo.FullPath, parts)
}
+ if len(hashbad) > 0 {
+ log.Printf("%-13.13s %-55.55s %v\n", "BAD cmd", repo.FullPath, cmd1)
+ }
// things still only in the local branch (bad to delete)
for _, line := range hashbad {
- // notes.addTextNote("BAD", repo, localRef.GetRef(), cmd2, line)
- notes.addTextNote("BAD", repo, "in deleteHash", cmd2, line)
parts := strings.Split(line, "%00") // git log doesn't actually convert %00 to NULL
- if len(parts) != 4 {
- log.Info("len", len(parts))
- panic("nope")
- }
- findThisHash := parts[0]
- log.Info(findThisHash, deleteHash, "need to figure out the patchID for this to be deleted hash")
+ log.Printf("%-13.13s %-55.55s %v\n", "BAD keep", repo.FullPath, parts)
}
if len(hashbad) == 0 {