mirror of
https://github.com/tj/git-extras.git
synced 2026-09-10 07:26:17 -04:00
Merge pull request #654 from spacewander/replace-xargs-r
git-delete-merged-branches: replace xargs -r option
This commit is contained in:
commit
9334c9db31
|
|
@ -1,3 +1,7 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
git branch --no-color --merged | grep -v "\*" | grep -v master | grep -v svn | xargs -r -n 1 git branch -d
|
||||
branches=$(git branch --no-color --merged | grep -v "\*" | grep -v master | grep -v svn)
|
||||
if [ -n "$branches" ]
|
||||
then
|
||||
echo "$branches" | xargs -n 1 git branch -d
|
||||
fi
|
||||
|
|
|
|||
Loading…
Reference in a new issue