Andrew's git
/
gitweb.git
/ blobdiff
summary
|
log
|
commit
|
diff
|
tree
commit
grep
author
committer
pickaxe
?
re
git-clone: Keep remote names when cloning unless explicitly told not to.
[gitweb.git]
/
git-clone.sh
diff --git
a/git-clone.sh
b/git-clone.sh
index f5ef70b8afa792671f5aa6e4dd752e63c376c6dd..8e7150127aff222059f3549a8b7f647b8f792c7d 100755
(executable)
--- a/
git-clone.sh
+++ b/
git-clone.sh
@@
-96,6
+96,8
@@
if base=$(get_repo_base "$repo"); then
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')
mkdir "$dir" &&
D=$(
(cd "$dir" && git-init-db && pwd)