summaryrefslogtreecommitdiff
path: root/doClean.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2025-02-14 18:40:55 -0600
committerJeff Carr <[email protected]>2025-02-14 18:40:55 -0600
commit10f53c5f178e2303b7d3b011c1f9afbdc8c1c63e (patch)
tree01c42eca3d4ab53564afc620cd0ac03c52722561 /doClean.go
parent7d4bb336b3cecec23e611ef420a7052f955200ad (diff)
general work on 'Build()'
Diffstat (limited to 'doClean.go')
-rw-r--r--doClean.go22
1 files changed, 11 insertions, 11 deletions
diff --git a/doClean.go b/doClean.go
index bf732de..bb6b134 100644
--- a/doClean.go
+++ b/doClean.go
@@ -290,7 +290,7 @@ func doCleanUserBranch(repo *gitpb.Repo, branch *gitpb.GitBranch) error {
} else {
log.Info("why is this local only branch a problem?", branch.Name)
repo.RunVerbose([]string{"ls", "-l", ".git/refs/remotes/origin"})
- r, err := repo.RunVerbose([]string{"cat", filepath.Join(".git/refs/heads", branch.Name)})
+ r, err := repo.RunStrict([]string{"cat", filepath.Join(".git/refs/heads", branch.Name)})
if err == nil {
cmd := []string{"git", "show", "-s", "--format=\"%H %ae %as %s\"", r.Stdout[0]}
repo.RunVerbose(cmd)
@@ -304,7 +304,7 @@ func doCleanUserBranch(repo *gitpb.Repo, branch *gitpb.GitBranch) error {
log.Info("THIS USER BRANCH IS CLEAN TO DELETE", branch.Name)
if argv.Clean.Force != nil {
cmd := []string{"git", "branch", "-D", branch.Name}
- if _, err := repo.RunVerbose(cmd); err != nil {
+ if _, err := repo.RunStrict(cmd); err != nil {
log.Info("THE GIT BRANCH DELETE ERROR IS:", err)
return err
}
@@ -397,20 +397,20 @@ func forceDeleteUserBranch(repo *gitpb.Repo, branch string) error {
configSave = true
cmd := []string{"git", "branch", "-D", branch}
- if _, err := repo.RunVerbose(cmd); err != nil {
+ if err := repo.RunVerbose(cmd); err != nil {
log.Info("THE GIT BRANCH DELETE ERROR IS:", err)
// return err
}
log.Info("THIS USER REMOTE BRANCH MUST BE DELETED HERE", branch)
if repo.Exists(filepath.Join(".git/refs/remote/origin", branch)) {
cmd = []string{"git", "push", "origin", "--delete", branch}
- if _, err := repo.RunVerbose(cmd); err != nil {
+ if err := repo.RunVerbose(cmd); err != nil {
log.Info("THE GIT BRANCH DELETE ERROR IS:", err)
// return err
}
}
cmd = []string{"git", "branch", "-D", "--remote", "origin/" + branch}
- if _, err := repo.RunVerbose(cmd); err != nil {
+ if err := repo.RunVerbose(cmd); err != nil {
log.Info("THE GIT BRANCH DELETE ERROR IS:", err)
// return err
}
@@ -427,20 +427,20 @@ func BADforceDeleteBranch(repo *gitpb.Repo, branch string) error {
configSave = true
cmd := []string{"git", "branch", "-D", branch}
- if _, err := repo.RunVerbose(cmd); err != nil {
+ if err := repo.RunVerbose(cmd); err != nil {
log.Info("THE GIT BRANCH DELETE ERROR IS:", err)
// return err
}
log.Info("THIS USER REMOTE BRANCH MUST BE DELETED HERE", branch)
if repo.Exists(filepath.Join(".git/refs/remote/origin", branch)) {
cmd = []string{"git", "push", "origin", "--delete", branch}
- if _, err := repo.RunVerbose(cmd); err != nil {
+ if err := repo.RunVerbose(cmd); err != nil {
log.Info("THE GIT BRANCH DELETE ERROR IS:", err)
// return err
}
}
cmd = []string{"git", "branch", "-D", "--remote", "origin/" + branch}
- if _, err := repo.RunVerbose(cmd); err != nil {
+ if err := repo.RunVerbose(cmd); err != nil {
log.Info("THE GIT BRANCH DELETE ERROR IS:", err)
// return err
}
@@ -513,12 +513,12 @@ func justDeleteTheDevelBranchAlready(repo *gitpb.Repo) error {
if b1 == 0 {
cmd := []string{"git", "branch", "-D", repo.GetDevelBranchName()}
log.Info("DEVEL IS IN REMOTE", repo.GetGoPath(), cmd)
- _, err := repo.RunVerbose(cmd)
+ err := repo.RunVerbose(cmd)
return err
}
cmd := []string{"git", "push"}
log.Info("DEVEL LOCAL NEEDS GIT PUSH TO REMOTE", repo.GetGoPath(), cmd)
- _, err := repo.RunVerbose(cmd)
+ err := repo.RunVerbose(cmd)
return err
}
@@ -528,7 +528,7 @@ func justDeleteTheDevelBranchAlready(repo *gitpb.Repo) error {
if b1 == 0 {
cmd := []string{"git", "branch", "-D", repo.GetDevelBranchName()}
log.Info("DEVEL IS IN REMOTE", repo.GetGoPath(), cmd)
- _, err := repo.RunVerbose(cmd)
+ err := repo.RunVerbose(cmd)
return err
}
cmd := []string{"git", "merge something somehow"}