]> git.wh0rd.org Git - home.git/commitdiff
handle --dry-run
authorMike Frysinger <vapier@gentoo.org>
Fri, 2 Nov 2012 16:02:51 +0000 (12:02 -0400)
committerMike Frysinger <vapier@gentoo.org>
Fri, 2 Nov 2012 16:02:51 +0000 (12:02 -0400)
.bin/r

diff --git a/.bin/r b/.bin/r
index 5d497555e18d8dac9b2a2c3d29437fdfdfce6198..c5792c946f1bad0f07299153e5ecf8a08af72348 100755 (executable)
--- a/.bin/r
+++ b/.bin/r
@@ -156,6 +156,7 @@ g-push)
        fi
        remote_branch=${remote_branch#refs/heads/}
 
+       git_args=()
        reviewers=""
        while [[ $# -gt 0 ]] ; do
                case $1 in
@@ -163,6 +164,9 @@ g-push)
                        reviewers=$2
                        shift
                        ;;
+               -n|--dry-run)
+                       git_args+=( $1 )
+                       ;;
                *)
                        err "unknown option: $1"
                        ;;
@@ -170,7 +174,6 @@ g-push)
                shift
        done
 
-       git_args=()
        if [[ -n ${reviewers} ]] ; then
                reviewers=( ${reviewers//,/ } )
                git_args+=( "--receive-pack=git receive-pack ${reviewers[*]/#/--reviewer=}" )