From: Uwe Zeisberger Date: Fri, 20 Jan 2006 06:47:39 +0000 (+0100) Subject: Fix generation of "humanish" part of source repo X-Git-Tag: v1.2.0~134 X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=e7555785f4edcf4988c53305349e3f525216e2cb;p=git.git 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 168eb963..ded40856 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) &&