Skip to content

Commit

Permalink
Merge branch 'js/fetch-progress'
Browse files Browse the repository at this point in the history
* js/fetch-progress:
  git-fetch: add --quiet
  • Loading branch information
Junio C Hamano committed Apr 9, 2007
2 parents d39d10d + a858c00 commit 27be481
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions git-fetch.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ keep=
shallow_depth=
no_progress=
test -t 1 || no_progress=--no-progress
quiet=
while case "$#" in 0) break ;; esac
do
case "$1" in
Expand Down Expand Up @@ -56,6 +57,9 @@ do
--update-head-o|--update-head-ok)
update_head_ok=t
;;
-q|--q|--qu|--qui|--quie|--quiet)
quiet=--quiet
;;
-v|--verbose)
verbose=Yes
;;
Expand Down Expand Up @@ -173,8 +177,8 @@ fetch_all_at_once () {
git-bundle unbundle "$remote" $rref ||
echo failed "$remote"
else
git-fetch-pack --thin $exec $keep $shallow_depth $no_progress \
"$remote" $rref ||
git-fetch-pack --thin $exec $keep $shallow_depth \
$quiet $no_progress "$remote" $rref ||
echo failed "$remote"
fi
) |
Expand Down Expand Up @@ -248,7 +252,8 @@ fetch_per_ref () {
expr "z$head" : "z$_x40\$" >/dev/null ||
die "No such ref $remote_name at $remote"
echo >&2 "Fetching $remote_name from $remote using $proto"
git-http-fetch -v -a "$head" "$remote" || exit
case "$quiet" in '') v=-v ;; *) v= ;; esac
git-http-fetch $v -a "$head" "$remote" || exit
;;
rsync://*)
test -n "$shallow_depth" &&
Expand All @@ -257,8 +262,9 @@ fetch_per_ref () {
rsync -L -q "$remote/$remote_name" "$TMP_HEAD" || exit 1
head=$(git-rev-parse --verify TMP_HEAD)
rm -f "$TMP_HEAD"
case "$quiet" in '') v=-v ;; *) v= ;; esac
test "$rsync_slurped_objects" || {
rsync -av --ignore-existing --exclude info \
rsync -a $v --ignore-existing --exclude info \
"$remote/objects/" "$GIT_OBJECT_DIRECTORY/" || exit
# Look at objects/info/alternates for rsync -- http will
Expand Down

0 comments on commit 27be481

Please sign in to comment.