summaryrefslogtreecommitdiffstats
path: root/supercherry
diff options
context:
space:
mode:
authorFlorian Pritz <bluewind@xinu.at>2021-06-28 17:43:56 +0200
committerFlorian Pritz <bluewind@xinu.at>2021-06-28 17:44:17 +0200
commit271a776ec047229a381a7de7161cccab9ba3fd63 (patch)
tree3ae0ecf98ffa0021b63deb9dbef6c8434595a978 /supercherry
parent65673a9685329531eb01e61d45f059da71843451 (diff)
downloadbin-271a776ec047229a381a7de7161cccab9ba3fd63.tar.gz
bin-271a776ec047229a381a7de7161cccab9ba3fd63.tar.xz
supercherry: Support restricting cherry targets
Signed-off-by: Florian Pritz <bluewind@xinu.at>
Diffstat (limited to 'supercherry')
-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