From e7555785f4edcf4988c53305349e3f525216e2cb Mon Sep 17 00:00:00 2001 From: Uwe Zeisberger Date: Fri, 20 Jan 2006 07:47:39 +0100 Subject: 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 diff --git a/git-clone.sh b/git-clone.sh index 168eb96..ded4085 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) && -- cgit v0.10.2-6-g49f6