From: Junio C Hamano Date: Tue, 3 Jul 2007 04:48:08 +0000 (-0700) Subject: Merge branch 'jo/init' X-Git-Tag: v1.5.3-rc0~4 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/3b0d9992ee9849cf12b16662f2b3c272e6792213?ds=inline;hp=-c Merge branch 'jo/init' * jo/init: Quiet the output from git-init when cloning, if requested. Add an option to quiet git-init. --- 3b0d9992ee9849cf12b16662f2b3c272e6792213 diff --combined git-clone.sh index 4cbf60f554,dacaaa678f..262508683d --- a/git-clone.sh +++ b/git-clone.sh @@@ -72,17 -72,6 +72,17 @@@ Perhaps git-update-server-info needs t rm -fr "$clone_tmp" http_fetch "$1/HEAD" "$GIT_DIR/REMOTE_HEAD" || rm -f "$GIT_DIR/REMOTE_HEAD" + if test -f "$GIT_DIR/REMOTE_HEAD"; then + head_sha1=`cat "$GIT_DIR/REMOTE_HEAD"` + case "$head_sha1" in + 'ref: refs/'*) + ;; + *) + git-http-fetch $v -a "$head_sha1" "$1" || + rm -f "$GIT_DIR/REMOTE_HEAD" + ;; + esac + fi } quiet= @@@ -195,7 -184,7 +195,7 @@@ yes GIT_DIR="$D" ;; *) GIT_DIR="$D/.git" ;; - esac && export GIT_DIR && git-init ${template+"$template"} || usage + esac && export GIT_DIR && git-init $quiet ${template+"$template"} || usage if test -n "$reference" then