diff options
author | Uwe Zeisberger <zeisberg@informatik.uni-freiburg.de> | 2006-01-20 07:47:39 +0100 |
---|---|---|
committer | Junio C Hamano <junkio@cox.net> | 2006-01-19 23:24:34 -0800 |
commit | e7555785f4edcf4988c53305349e3f525216e2cb (patch) | |
tree | 3e17b9a55f6a3ef13e8d1ffe80b0b29b464d549e /git-clone.sh | |
parent | 2fabd217330ea6a5b5082e9e86b169e3401de889 (diff) | |
download | git-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-x | git-clone.sh | 2 |
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) && |