From: Mike Frysinger Date: Fri, 2 Nov 2012 16:02:51 +0000 (-0400) Subject: handle --dry-run X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=eacd89fe9f2ef5895d479e4888556ef6acf5ebd9;p=home.git handle --dry-run --- diff --git a/.bin/r b/.bin/r index 5d49755..c5792c9 100755 --- 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=}" )