Skip to content

Commit

Permalink
Do not give alarming error message from rsync in fetch and clone.
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Junio C Hamano committed Sep 20, 2005
1 parent 2a39064 commit 89d844d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
3 changes: 2 additions & 1 deletion git-clone.sh
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,8 @@ yes,yes)
# 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 "$repo/objects/info/alternates" "$D/.git/TMP_ALT" ||
rsync -q "$repo/objects/info/alternates" \
"$D/.git/TMP_ALT" 2>/dev/null ||
rm -f "$D/.git/TMP_ALT"
if test -f "$D/.git/TMP_ALT"
then
Expand Down
5 changes: 3 additions & 2 deletions git-fetch.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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" |
Expand Down

0 comments on commit 89d844d

Please sign in to comment.