From e7555785f4edcf4988c53305349e3f525216e2cb Mon Sep 17 00:00:00 2001 From: Uwe Zeisberger Date: Fri, 20 Jan 2006 07:47:39 +0100 Subject: [PATCH] Fix generation of "humanish" part of source repo If repo has the form : and doesn't contain a slash, the cloned repository is named ":", instead of "" only. Signed-off-by: Uwe Zeisberger Signed-off-by: Junio C Hamano --- git-clone.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) &&