diff options
author | Junio C Hamano <junkio@cox.net> | 2006-07-10 03:34:34 -0700 |
---|---|---|
committer | Junio C Hamano <junkio@cox.net> | 2006-07-13 23:10:21 -0700 |
commit | 57a39690b936c003662b6710241732b980e58790 (patch) | |
tree | 969d9d54900dc423f7ed65854d60dec7d687f9de /git-fetch.sh | |
parent | 4b7ce6e2d6ba088da50de1df38b040ea2c0b8f18 (diff) | |
download | git-57a39690b936c003662b6710241732b980e58790.tar.gz git-57a39690b936c003662b6710241732b980e58790.tar.xz |
fetch/clone: check return status from ls-remote
Some callers of ls-remote did not check its return status.
Diffstat (limited to 'git-fetch.sh')
-rwxr-xr-x | git-fetch.sh | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/git-fetch.sh b/git-fetch.sh index ff1769952..0c7a11d56 100755 --- a/git-fetch.sh +++ b/git-fetch.sh @@ -223,9 +223,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 @@ -235,7 +242,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. |