]> oss.titaniummirror.com Git - git-utils.git/commitdiff
Fix git-publish-branch usage statement and argument parsing.
authorsmckown <smckown@986fd584-583e-0410-b54d-b9fe63dff8e5>
Mon, 23 Nov 2009 20:30:02 +0000 (20:30 +0000)
committersmckown <smckown@986fd584-583e-0410-b54d-b9fe63dff8e5>
Mon, 23 Nov 2009 20:30:02 +0000 (20:30 +0000)
git-publish-branch

index fb38886c16154a11cbd52297fd46602266a89412..9026e0072759eb39d0abfd374675dddd3e4257ae 100755 (executable)
@@ -1,5 +1,5 @@
 #!/bin/sh
-# git-publish-branch [-d] <branch> [repository]
+# git-publish-branch [-d] [branch] [repository]
 
 unset delete
 if [ "$1" = "-d" ]; then
@@ -13,11 +13,11 @@ unset remote
 if [ $# -eq 1 ]; then
     branch=$1
 elif [ $# -eq 2 ]; then
-    remote=$1
-    branch=$2
+    branch=$1
+    remote=$2
 elif [ $# -gt 2 ]; then
-    echo "Usage: $0 [<repository>] <branch>" >&2
-    exit 127
+    echo "Usage: $0 [branch] [repository]" >&2
+    exit 1
 fi
 
 if [ -z "$branch" ]; then