提交 e7555785 编写于 作者: U Uwe Zeisberger 提交者: Junio C Hamano

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: NUwe Zeisberger <zeisberg@informatik.uni-freiburg.de>
Signed-off-by: NJunio C Hamano <junkio@cox.net>
上级 2fabd217
...@@ -99,7 +99,7 @@ fi ...@@ -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) &&
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册