Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUwe Zeisberger <zeisberg@informatik.uni-freiburg.de>2006-01-20 09:47:39 +0300
committerJunio C Hamano <junkio@cox.net>2006-01-20 10:24:34 +0300
commite7555785f4edcf4988c53305349e3f525216e2cb (patch)
tree3e17b9a55f6a3ef13e8d1ffe80b0b29b464d549e /git-clone.sh
parent2fabd217330ea6a5b5082e9e86b169e3401de889 (diff)
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 168eb963ba..ded40856c5 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) &&