[PATCH] Provide access to git_dir through get_git_dir().
[git.git] / git-fetch.sh
index 72f17ab..e4a6a68 100755 (executable)
@@ -178,7 +178,7 @@ do
        head=$(curl -nsf $curl_extra_args "$remote/$remote_name") &&
        expr "$head" : "$_x40\$" >/dev/null ||
                die "Failed to fetch $remote_name from $remote"
-       echo Fetching "$remote_name from $remote" using http
+       echo >&2 Fetching "$remote_name from $remote" using http
        git-http-fetch -v -a "$head" "$remote/" || exit
        ;;
     rsync://*)
@@ -193,8 +193,9 @@ do
            # Look at objects/info/alternates for rsync -- http will
            # support it natively and git native ones will do it on the remote
            # end.  Not having that file is not a crime.
-           rsync -q "$remote/objects/info/alternates" "$GIT_DIR/TMP_ALT" ||
-                   rm -f "$GIT_DIR/TMP_ALT"
+           rsync -q "$remote/objects/info/alternates" \
+               "$GIT_DIR/TMP_ALT" 2>/dev/null ||
+               rm -f "$GIT_DIR/TMP_ALT"
            if test -f "$GIT_DIR/TMP_ALT"
            then
                resolve_alternates "$remote" <"$GIT_DIR/TMP_ALT" |