summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xsupercherry7
1 files changed, 6 insertions, 1 deletions
diff --git a/supercherry b/supercherry
index fad2460..568b342 100755
--- a/supercherry
+++ b/supercherry
@@ -5,6 +5,11 @@
base="${1:-master}"
+remotes=("${@:2}")
+
+if [[ "${#remotes[@]}" -eq 0 ]]; then
+ remotes=(refs/remotes)
+fi
RED="\e[1;31m"
GREEN="\e[0;32m"
@@ -15,7 +20,7 @@ GRAY="\e[0;37m"
NONE="\e[0;0m"
-for ref in $(git for-each-ref --format='%(refname)' refs/remotes); do
+for ref in $(git for-each-ref --format='%(refname)' "${remotes[@]}"); do
sha1="$(git rev-parse --verify $ref)"
if [ "$(git merge-base $ref $base)" = "$sha1" ]; then
continue