From: Dato Simó Date: Mon, 23 Sep 2013 21:13:54 +0000 (+0100) Subject: vcsh: strip host part from GIT_REMOTE when inferring VCSH_REPO_NAME X-Git-Url: https://git.madduck.net/code/vcsh.git/commitdiff_plain/b4bee06a2de5d74f9b1de64ffbb464e235a3194a?ds=sidebyside;hp=b4bee06a2de5d74f9b1de64ffbb464e235a3194a vcsh: strip host part from GIT_REMOTE when inferring VCSH_REPO_NAME `vcsh clone` does: VCSH_REPO_NAME=$(basename "${GIT_REMOTE}" .git) Typically, most remote paths will have a non-empty directory component, so using basename works well in all common cases. However, when doing something like: % vcsh clone example.org:repo.git VCSH_REPO_NAME will be set to "example.org:repo" instead of "repo". This also happens when using url..insteadOf, à-la: % vcsh clone v:repo Stripping everything up to the first colon in the remote URL fixes the issue. N.B.: remote URLs with protocol (e.g. http://, git://, or ssh://) do not exhibit this problem, and are unaffected by this change. Conflicts: vcsh ---