diff options
Diffstat (limited to 'doClean.go')
| -rw-r--r-- | doClean.go | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -62,9 +62,9 @@ func doCleanDevel() error { // log.Info("Cleaning:", repo.GetGoPath()) } total += 1 - if repo.GetCurrentBranchName() != repo.GetDevelBranchName() { - // only process branches in devel - // return nil + if repo.GetCurrentBranchName() != repo.GetMasterBranchName() { + // repos must be in the master branch to clean the devel branch + return nil } if repo.IsDirty() { return nil @@ -110,7 +110,9 @@ func checkhashes(repo *gitpb.Repo, hashes []string, refpath string) ([]string, e func doCleanDevelRepo(repo *gitpb.Repo) error { var hashes []string devel := repo.GetDevelBranchName() - // log.Printf("%s Start verify devel branch: %s\n", repo.GetGoPath(), devel) + if argv.Verbose { + log.Printf("Start clean devel branch: %s %s\n", repo.GetGoPath(), devel) + } // check if devel branch exists in remote repo if repo.Exists(filepath.Join(".git/refs/remotes/origin", devel)) { @@ -451,7 +453,6 @@ func forceDeleteUserBranch(repo *gitpb.Repo, branch string) error { } log.Info("THIS USER REMOTE BRANCH MUST BE DELETED HERE", branch) if repo.Exists(filepath.Join(".git/refs/remote/origin", branch)) { - // git push origin --delete jcarr cmd = []string{"git", "push", "origin", "--delete", branch} if _, err := repo.RunVerbose(cmd); err != nil { log.Info("THE GIT BRANCH DELETE ERROR IS:", err) @@ -482,7 +483,6 @@ func BADforceDeleteBranch(repo *gitpb.Repo, branch string) error { } log.Info("THIS USER REMOTE BRANCH MUST BE DELETED HERE", branch) if repo.Exists(filepath.Join(".git/refs/remote/origin", branch)) { - // git push origin --delete jcarr cmd = []string{"git", "push", "origin", "--delete", branch} if _, err := repo.RunVerbose(cmd); err != nil { log.Info("THE GIT BRANCH DELETE ERROR IS:", err) |
