]> git.madduck.net Git - code/vcsh.git/commit

madduck's git repository

Every one of the projects in this repository is available at the canonical URL git://git.madduck.net/madduck/pub/<projectpath> — see each project's metadata for the exact URL.

All patches and comments are welcome. Please squash your changes to logical commits before using git-format-patch and git-send-email to patches@git.madduck.net. If you'd read over the Git project's submission guidelines and adhered to them, I'd be especially grateful.

SSH access, as well as push access can be individually arranged.

If you use my repositories frequently, consider adding the following snippet to ~/.gitconfig and using the third clone URL listed for each project:

[url "git://git.madduck.net/madduck/"]
  insteadOf = madduck:

vcsh: strip host part from GIT_REMOTE when inferring VCSH_REPO_NAME
authorDato Simó <dato@net.com.org.es>
Mon, 23 Sep 2013 21:13:54 +0000 (22:13 +0100)
committerRichard Hartmann <richih@debian.org>
Tue, 4 Feb 2014 22:03:01 +0000 (23:03 +0100)
commitb4bee06a2de5d74f9b1de64ffbb464e235a3194a
tree773f936fcce54c1317d943263ec09d9fdea0d11b
parent75c4c554eefbefb714fabd356933858edbce3b1e
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.<x>.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
vcsh