From 5ab4584eb2f62ff67d15c5a2455f3f35790e5a0e Mon Sep 17 00:00:00 2001 From: Knut Ahlers Date: Mon, 24 Oct 2016 08:20:44 +0200 Subject: [PATCH] Fix: Cannot use -r on OSX, replacing --- bin/git-ps | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/bin/git-ps b/bin/git-ps index 96371ec..54c866d 100755 --- a/bin/git-ps +++ b/bin/git-ps @@ -25,4 +25,6 @@ for branch in $(git branch --merged | grep -v '^*'); do done step "Removing local branches where remote branch is gone..." -git branch -vv | awk '/: gone]/{print $1}' | xargs -r git branch -D +if ( git branch -vv | grep -q ': gone ]' ); then + git branch -vv | awk '/: gone]/{print $1}' | xargs git branch -D +fi