summaryrefslogtreecommitdiff
path: root/doClean.go
diff options
context:
space:
mode:
Diffstat (limited to 'doClean.go')
-rw-r--r--doClean.go12
1 files changed, 6 insertions, 6 deletions
diff --git a/doClean.go b/doClean.go
index f6efdb5..9955c5c 100644
--- a/doClean.go
+++ b/doClean.go
@@ -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)