summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 365527a)
raw | patch | inline | side by side (parent: 365527a)
author | Junio C Hamano <junkio@cox.net> | |
Tue, 13 Sep 2005 05:20:02 +0000 (22:20 -0700) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Tue, 13 Sep 2005 05:52:52 +0000 (22:52 -0700) |
When git-fetch-pack fails, the command does not notice the failure
and instead pretended nothing was fetched and there was nothing wrong.
Signed-off-by: Junio C Hamano <junkio@cox.net>
and instead pretended nothing was fetched and there was nothing wrong.
Signed-off-by: Junio C Hamano <junkio@cox.net>
git-fetch.sh | patch | blob | history |
diff --git a/git-fetch.sh b/git-fetch.sh
index 673a1841793ff5cd5b3422471dfaebf049b5b63e..22739440384648357896898f11001e2fa05f217e 100755 (executable)
--- a/git-fetch.sh
+++ b/git-fetch.sh
http://* | https://* | rsync://* )
;; # we are already done.
*)
- git-fetch-pack "$remote" $rref |
+ (
+ git-fetch-pack "$remote" $rref || echo failed "$remote"
+ ) |
while read sha1 remote_name
do
+ case "$sha1" in
+ failed)
+ echo >&2 "Fetch failure: $remote"
+ exit 1 ;;
+ esac
found=
single_force=
for ref in $refs
local_name=$(expr "$found" : '[^:]*:\(.*\)')
append_fetch_head "$sha1" "$remote" "$remote_name" "$remote_nick" "$local_name"
- done
+ done || exit
;;
esac