Reapply "git-delete-merged-branches: replace xargs -r option"

This reverts commit faf16eff5d.
This commit is contained in:
Rudxain 2026-03-03 03:07:38 -04:00
parent 4439270594
commit 162aae03b1

View file

@ -1,7 +1,11 @@
#!/usr/bin/env bash
git branch --no-color --merged |
branches=$(git branch --no-color --merged |
grep -vE "^(\*|\+)" |
grep -v "$(git_extra_default_branch)" |
grep -v svn |
xargs -r git branch -d
grep -v svn \
)
if [ -n "$branches" ]
then
echo "$branches" | xargs git branch -d
fi