diff options
author | Florian Pritz <bluewind@xinu.at> | 2021-06-28 17:43:56 +0200 |
---|---|---|
committer | Florian Pritz <bluewind@xinu.at> | 2021-06-28 17:44:17 +0200 |
commit | 271a776ec047229a381a7de7161cccab9ba3fd63 (patch) | |
tree | 3ae0ecf98ffa0021b63deb9dbef6c8434595a978 /supercherry | |
parent | 65673a9685329531eb01e61d45f059da71843451 (diff) | |
download | bin-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-x | supercherry | 7 |
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 |