lib/git/branch/stray.rb in git-branch--stray-1.8.0 vs lib/git/branch/stray.rb in git-branch--stray-2.0.0

- old
+ new

@@ -22,11 +22,10 @@ `git #{command}`.split($RS).each(&:strip!) end end module Git - module_function def local_head_refs git("for-each-ref --format='%(refname)' refs/heads") end @@ -79,25 +78,22 @@ (upstream_branch = to_branch_name[merge_ref]) && !remote_branch_names[remote].include?(upstream_branch) } end - # rubocop:disable Layout/LineLength def delete_stray_branches stray_branches.each_consented('Delete stray branch "%s"', inspector: :yellow) do |stray| system("git branch -d #{stray}") next if $CHILD_STATUS.success? Array(stray).each_consented('Delete unmerged branch "%s"', inspector: :red) do |unmerged| system("git branch -D #{unmerged}") end end end - # rubocop:enable Layout/LineLength def list_stray_branches stray_branches.each do |stray| system("git --no-pager branch -vv --list #{stray}") end end - end