Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
Bugfix: stop if directory already exists
author
Josef Weidendorfer
<Josef.Weidendorfer@gmx.de>
Sun, 13 Nov 2005 14:03:31 +0000
(15:03 +0100)
committer
Junio C Hamano
<junkio@cox.net>
Mon, 14 Nov 2005 08:50:17 +0000
(
00:50
-0800)
Fix a typo: We do not want to run the directory as command,
and want to terminate if the directory exists
Additionally, update the usage message
Signed-off-by: Josef Weidendorfer <Josef.Weidendorfer@gmx.de>
Signed-off-by: Junio C Hamano <junkio@cox.net>
git-clone.sh
patch
|
blob
|
history
raw
|
patch
|
inline
| side by side (parent:
94d2331
)
diff --git
a/git-clone.sh
b/git-clone.sh
index f99e0adf86254c7e3c6848b767b60dd0b8017096..c09979a7a49e36b35e333b902cb0e0d689b693f4 100755
(executable)
--- a/
git-clone.sh
+++ b/
git-clone.sh
@@
-9,7
+9,7
@@
unset CDPATH
usage() {
unset CDPATH
usage() {
- echo >&2 "* git clone [-l [-s]] [-q] [-u <upload-pack>] [-n] <repo>
<dir>
"
+ echo >&2 "* git clone [-l [-s]] [-q] [-u <upload-pack>] [-n] <repo>
[<dir>]
"
exit 1
}
exit 1
}
@@
-98,7
+98,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')
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')
-[ -e "$dir" ] &&
$(echo "$dir already exists."; usage)
+[ -e "$dir" ] &&
echo "$dir already exists." && usage
mkdir -p "$dir" &&
D=$(
(cd "$dir" && git-init-db && pwd)
mkdir -p "$dir" &&
D=$(
(cd "$dir" && git-init-db && pwd)