aboutsummaryrefslogtreecommitdiff
path: root/git-clone.sh
diff options
context:
space:
mode:
authorUwe Zeisberger <zeisberg@informatik.uni-freiburg.de>2006-01-20 07:47:39 +0100
committerJunio C Hamano <junkio@cox.net>2006-01-19 23:24:34 -0800
commite7555785f4edcf4988c53305349e3f525216e2cb (patch)
tree3e17b9a55f6a3ef13e8d1ffe80b0b29b464d549e /git-clone.sh
parent2fabd217330ea6a5b5082e9e86b169e3401de889 (diff)
downloadgit-e7555785f4edcf4988c53305349e3f525216e2cb.tar.gz
git-e7555785f4edcf4988c53305349e3f525216e2cb.tar.xz
Fix generation of "humanish" part of source repo
If repo has the form <host>:<path> and <path> doesn't contain a slash, the cloned repository is named "<host>:<path>", instead of "<path>" only. Signed-off-by: Uwe Zeisberger <zeisberg@informatik.uni-freiburg.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'git-clone.sh')
-rwxr-xr-xgit-clone.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/git-clone.sh b/git-clone.sh
index 168eb963b..ded40856c 100755
--- a/git-clone.sh
+++ b/git-clone.sh
@@ -99,7 +99,7 @@ fi
dir="$2"
# Try using "humanish" part of source repo if user didn't specify one
-[ -z "$dir" ] && dir=$(echo "$repo" | sed -e 's|/$||' -e 's|:*/*\.git$||' -e 's|.*/||g')
+[ -z "$dir" ] && dir=$(echo "$repo" | sed -e 's|/$||' -e 's|:*/*\.git$||' -e 's|.*[/:]||g')
[ -e "$dir" ] && echo "$dir already exists." && usage
mkdir -p "$dir" &&
D=$(cd "$dir" && pwd) &&