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>
This commit is contained in:
parent
2fabd21733
commit
e7555785f4
@ -99,7 +99,7 @@ fi
|
|||||||
|
|
||||||
dir="$2"
|
dir="$2"
|
||||||
# Try using "humanish" part of source repo if user didn't specify one
|
# 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
|
[ -e "$dir" ] && echo "$dir already exists." && usage
|
||||||
mkdir -p "$dir" &&
|
mkdir -p "$dir" &&
|
||||||
D=$(cd "$dir" && pwd) &&
|
D=$(cd "$dir" && pwd) &&
|
||||||
|
Loading…
Reference in New Issue
Block a user