Skip to content

Commit 89d844d

Browse files
author
Junio C Hamano
committed
Do not give alarming error message from rsync in fetch and clone.
When we check the optional objects/info/alternates file at the remote repository, we forgot to really squelch error message from rsync. Not having that file is not a crime. Signed-off-by: Junio C Hamano <junkio@cox.net>
1 parent 2a39064 commit 89d844d

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

git-clone.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,8 @@ yes,yes)
152152
# Look at objects/info/alternates for rsync -- http will
153153
# support it natively and git native ones will do it on the
154154
# remote end. Not having that file is not a crime.
155-
rsync -q "$repo/objects/info/alternates" "$D/.git/TMP_ALT" ||
155+
rsync -q "$repo/objects/info/alternates" \
156+
"$D/.git/TMP_ALT" 2>/dev/null ||
156157
rm -f "$D/.git/TMP_ALT"
157158
if test -f "$D/.git/TMP_ALT"
158159
then

git-fetch.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -193,8 +193,9 @@ do
193193
# Look at objects/info/alternates for rsync -- http will
194194
# support it natively and git native ones will do it on the remote
195195
# end. Not having that file is not a crime.
196-
rsync -q "$remote/objects/info/alternates" "$GIT_DIR/TMP_ALT" ||
197-
rm -f "$GIT_DIR/TMP_ALT"
196+
rsync -q "$remote/objects/info/alternates" \
197+
"$GIT_DIR/TMP_ALT" 2>/dev/null ||
198+
rm -f "$GIT_DIR/TMP_ALT"
198199
if test -f "$GIT_DIR/TMP_ALT"
199200
then
200201
resolve_alternates "$remote" <"$GIT_DIR/TMP_ALT" |

0 commit comments

Comments
 (0)