Skip to content

Commit

Permalink
Fix 'repo' and 'user' usage text on missing 2nd parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
leonklingele committed Mar 15, 2018
1 parent e8eaf95 commit 3fbed7e
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions client/git-simpleserver
Original file line number Diff line number Diff line change
Expand Up @@ -300,16 +300,18 @@ exec_ssh_cmd() {
}

main() {
if [ $# -lt 2 ]; then
usage
fi

CMD="usage"

local PARAM1="$1"
shift
local PARAM2="$1"
shift
local PARAM1
local PARAM2
if [ $# -gt 0 ]; then
PARAM1="$1"
shift
fi
if [ $# -gt 0 ]; then
PARAM2="$1"
shift
fi

case "$PARAM1" in
"repo" | "repos")
Expand Down

0 comments on commit 3fbed7e

Please sign in to comment.