More abstraction is better, also guards against invalid internal use. Signed-off-by: Jani Nikula <jani.nikula@xxxxxxxxx> --- dim | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/dim b/dim index a2c0d74c37e8..5833306e35c5 100755 --- a/dim +++ b/dim @@ -591,6 +591,11 @@ function dim_create_workdir # dim_pull_request branch upstream function dim_pull_request { + if [[ "x$1" = "x" || "x$2" = "x" ]]; then + echo "usage: $0 $subcommand branch upstream" + exit 1 + fi + branch=$1 upstream=$2 @@ -874,10 +879,6 @@ case "$subcommand" in $DRY git cherry-pick $1 ;; pull-request) - if [[ "x$1" = "x" || "x$2" = "x" ]]; then - echo "usage: $0 $subcommand branch upstream" - exit 1 - fi dim_pull_request $* ;; pull-request-next) -- 2.1.4 _______________________________________________ Intel-gfx mailing list Intel-gfx@xxxxxxxxxxxxxxxxxxxxx http://lists.freedesktop.org/mailman/listinfo/intel-gfx