X-Git-Url: https://git.madduck.net/code/vcsh.git/blobdiff_plain/75c4c554eefbefb714fabd356933858edbce3b1e..b4bee06a2de5d74f9b1de64ffbb464e235a3194a:/vcsh?ds=inline diff --git a/vcsh b/vcsh index 5d502e7..5d5628e 100755 --- a/vcsh +++ b/vcsh @@ -416,7 +416,7 @@ esac if [ "$VCSH_COMMAND" = 'clone' ]; then [ -z "$2" ] && fatal "$VCSH_COMMAND: please specify a remote" 1 GIT_REMOTE="$2" - [ -n "$3" ] && VCSH_REPO_NAME="$3" || VCSH_REPO_NAME=$(basename "$GIT_REMOTE" .git) + [ -n "$3" ] && VCSH_REPO_NAME="$3" || VCSH_REPO_NAME=$(basename "${GIT_REMOTE#*:}" .git) [ -z "$VCSH_REPO_NAME" ] && fatal "$VCSH_COMMAND: could not determine repository name" 1 export VCSH_REPO_NAME export GIT_DIR="$VCSH_REPO_D/$VCSH_REPO_NAME.git"