More abstraction is better, also guards against invalid internal use.
Signed-off-by: Jani Nikula <[email protected]>
---
dim | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/dim b/dim
index b9152a256a26..34f2312be37a 100755
--- a/dim
+++ b/dim
@@ -581,6 +581,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
@@ -864,10 +869,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
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx