From defe13a24a254f19596b8008095829068e742f9c Mon Sep 17 00:00:00 2001 From: Alex Riesen Date: Wed, 6 Jun 2007 16:39:05 -0700 Subject: Fix clone to setup the origin if its name ends with .git The problem is visible when cloning a local repo. The cloned repository will have the origin url setup incorrectly: the origin name will be copied verbatim in origin url of the cloned repository. Normally, the name is to be expanded into absolute path. Signed-off-by: Alex Riesen Signed-off-by: Junio C Hamano --- git-clone.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'git-clone.sh') diff --git a/git-clone.sh b/git-clone.sh index fdd354f2d..d45618d9a 100755 --- a/git-clone.sh +++ b/git-clone.sh @@ -20,7 +20,7 @@ usage() { get_repo_base() { ( cd "`/bin/pwd`" && - cd "$1" && + cd "$1" || cd "$1.git" && { cd .git pwd -- cgit v1.2.1