@matheusbsbs / matheus-bagliano / commits / 5e3a620cd5
Fork 0

git-clone: fix --bare over dumb-http

It left an extra .git/ directory under the target directory by mistake. Signed-off-by: Junio C Hamano <junkio@cox.net>

Junio C Hamano committed Jun 10, 2006 at 01:12 UTC 5e3a620cd5f7baaf27198192a614271c6145ec3b
1 file changed +2 -6
git-clone.sh
+2 -6
@@ -29,7 +29,7 @@ http_fetch () {
29 clone_dumb_http () {
30 # $1 - remote, $2 - local
31 cd "$2" &&
32 - clone_tmp='.git/clone-tmp' &&
32 + clone_tmp="$GIT_DIR/clone-tmp" &&
33 mkdir -p "$clone_tmp" || exit 1
34 http_fetch "$1/info/refs" "$clone_tmp/refs" || {
35 echo >&2 "Cannot get remote repository information.
@@ -207,15 +207,11 @@ mkdir -p "$dir" &&
207 D=$(cd "$dir" && pwd) &&
208 trap 'err=$?; cd ..; rm -r "$D"; exit $err' 0
209 case "$bare" in
210 -yes) GIT_DIR="$D" ;;
211 -*) GIT_DIR="$D/.git" ;;
212 -esac && export GIT_DIR && git-init-db ${template+"$template"} || usage
213 -case "$bare" in
210 yes)
211 GIT_DIR="$D" ;;
212 *)
213 GIT_DIR="$D/.git" ;;
218 -esac
214 +esac && export GIT_DIR && git-init-db ${template+"$template"} || usage
215
216 if test -n "$reference"
217 then