Merge branch 'jc/clone-bind-failure'

* jc/clone-bind-failure:
  fetch/clone: check return status from ls-remote
This commit is contained in:
Junio C Hamano 2006-07-25 13:19:54 -07:00
commit 09f5dc406a
2 changed files with 11 additions and 4 deletions

View File

@ -266,7 +266,7 @@ yes,yes)
echo "$repo/objects" >> "$GIT_DIR/objects/info/alternates" echo "$repo/objects" >> "$GIT_DIR/objects/info/alternates"
;; ;;
esac esac
git-ls-remote "$repo" >"$GIT_DIR/CLONE_HEAD" git-ls-remote "$repo" >"$GIT_DIR/CLONE_HEAD" || exit 1
;; ;;
*) *)
case "$repo" in case "$repo" in
@ -296,7 +296,7 @@ yes,yes)
done done
rm -f "$GIT_DIR/TMP_ALT" rm -f "$GIT_DIR/TMP_ALT"
fi fi
git-ls-remote "$repo" >"$GIT_DIR/CLONE_HEAD" git-ls-remote "$repo" >"$GIT_DIR/CLONE_HEAD" || exit 1
;; ;;
http://*) http://*)
if test -z "@@NO_CURL@@" if test -z "@@NO_CURL@@"

View File

@ -225,9 +225,16 @@ reflist=$(get_remote_refs_for_fetch "$@")
if test "$tags" if test "$tags"
then then
taglist=`IFS=" " && taglist=`IFS=" " &&
git-ls-remote $upload_pack --tags "$remote" | (
git-ls-remote $upload_pack --tags "$remote" ||
echo fail ouch
) |
while read sha1 name while read sha1 name
do do
case "$sha1" in
fail)
exit 1
esac
case "$name" in case "$name" in
*^*) continue ;; *^*) continue ;;
esac esac
@ -237,7 +244,7 @@ then
else else
echo >&2 "warning: tag ${name} ignored" echo >&2 "warning: tag ${name} ignored"
fi fi
done` done` || exit
if test "$#" -gt 1 if test "$#" -gt 1
then then
# remote URL plus explicit refspecs; we need to merge them. # remote URL plus explicit refspecs; we need to merge them.