lib/gitx/cli/cleanup_command.rb in gitx-2.22.0 vs lib/gitx/cli/cleanup_command.rb in gitx-2.23.0.ci.162.1
- old
+ new
@@ -29,10 +29,10 @@
args << '--remote' if options[:remote]
args << '--merged'
output = run_git_cmd('branch', *args).split("\n")
branches = output.map do |branch|
branch = branch.gsub(/\*/, '').strip.split(' ').first
- branch = branch.split('/').last if options[:remote]
+ branch = branch.gsub('origin/', '') if options[:remote]
branch
end
branches.uniq!
branches -= config.reserved_branches
branches.reject! { |b| config.aggregate_branch?(b) }