X-Git-Url: https://git.madduck.net/code/vcsh.git/blobdiff_plain/3a4566421e1f718a9b2dc2c69212c291660b296c..3ad6e99bcaf043ad9d6df0c1bd0376dc78ec31d6:/vcsh diff --git a/vcsh b/vcsh index c26b50a..8fedc09 100755 --- a/vcsh +++ b/vcsh @@ -19,7 +19,7 @@ help() { init Initialize a new repository clone - Clone from an existing repository + [] Clone from an existing repository exit Exit vcsh mode" >&2 } @@ -89,8 +89,10 @@ elif [ "$1" = 'use' ]; then return 0 elif [ "$1" = 'clone' ]; then - export GIT_REMOTE="$2" - export REPO_NAME="$3" + GIT_REMOTE="$2" + REPO_NAME="$3" + [[ -z $REPO_NAME ]] && REPO_NAME=$(basename $GIT_REMOTE .git) + export REPO_NAME export GIT_DIR="$VCSH_BASE/$REPO_NAME.git" init