Skip to content

Commit

Permalink
Merge branch 'jc/clone-bind-failure'
Browse files Browse the repository at this point in the history
* jc/clone-bind-failure:
  fetch/clone: check return status from ls-remote
  • Loading branch information
Junio C Hamano committed Jul 25, 2006
2 parents e79992a + 57a3969 commit 09f5dc4
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
4 changes: 2 additions & 2 deletions git-clone.sh
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ yes,yes)
echo "$repo/objects" >> "$GIT_DIR/objects/info/alternates"
;;
esac
git-ls-remote "$repo" >"$GIT_DIR/CLONE_HEAD"
git-ls-remote "$repo" >"$GIT_DIR/CLONE_HEAD" || exit 1
;;
*)
case "$repo" in
Expand Down Expand Up @@ -296,7 +296,7 @@ yes,yes)
done
rm -f "$GIT_DIR/TMP_ALT"
fi
git-ls-remote "$repo" >"$GIT_DIR/CLONE_HEAD"
git-ls-remote "$repo" >"$GIT_DIR/CLONE_HEAD" || exit 1
;;
http://*)
if test -z "@@NO_CURL@@"
Expand Down
11 changes: 9 additions & 2 deletions git-fetch.sh
Original file line number Diff line number Diff line change
Expand Up @@ -225,9 +225,16 @@ reflist=$(get_remote_refs_for_fetch "$@")
if test "$tags"
then
taglist=`IFS=" " &&
git-ls-remote $upload_pack --tags "$remote" |
(
git-ls-remote $upload_pack --tags "$remote" ||
echo fail ouch
) |
while read sha1 name
do
case "$sha1" in
fail)
exit 1
esac
case "$name" in
*^*) continue ;;
esac
Expand All @@ -237,7 +244,7 @@ then
else
echo >&2 "warning: tag ${name} ignored"
fi
done`
done` || exit
if test "$#" -gt 1
then
# remote URL plus explicit refspecs; we need to merge them.
Expand Down

0 comments on commit 09f5dc4

Please sign in to comment.