lib/gitx/cli/cleanup_command.rb in gitx-2.20.0 vs lib/gitx/cli/cleanup_command.rb in gitx-2.21.0.ci.121.1
- old
+ new
@@ -5,15 +5,15 @@
module Gitx
module Cli
class CleanupCommand < BaseCommand
desc 'cleanup', 'Cleanup branches that have been merged into master from the repo'
def cleanup
- checkout_branch Gitx::BASE_BRANCH
+ checkout_branch config.base_branch
run_cmd 'git pull'
run_cmd 'git remote prune origin'
say 'Deleting local and remote branches that have been merged into '
- say Gitx::BASE_BRANCH, :green
+ say config.base_branch, :green
merged_branches(remote: true).each do |branch|
run_cmd "git push origin --delete #{branch}"
end
merged_branches(remote: false).each do |branch|
run_cmd "git branch -d #{branch}"