26
26
shallow_depth=
27
27
no_progress=
28
28
test -t 1 || no_progress=--no-progress
29
+ quiet=
29
30
while case " $# " in 0) break ;; esac
30
31
do
31
32
case " $1 " in
56
57
--update-head-o|--update-head-ok)
57
58
update_head_ok=t
58
59
;;
60
+ -q|--q|--qu|--qui|--quie|--quiet)
61
+ quiet=--quiet
62
+ ;;
59
63
-v|--verbose)
60
64
verbose=Yes
61
65
;;
@@ -337,7 +341,8 @@ fetch_main () {
337
341
expr " z$head " : " z$_x40 \$ " > /dev/null ||
338
342
die " No such ref $remote_name at $remote "
339
343
echo >&2 " Fetching $remote_name from $remote using $proto "
340
- git-http-fetch -v -a " $head " " $remote /" || exit
344
+ case " $quiet " in ' ' ) v=-v ;; * ) v= ;; esac
345
+ git-http-fetch $v -a " $head " " $remote /" || exit
341
346
;;
342
347
rsync://* )
343
348
test -n " $shallow_depth " &&
@@ -346,8 +351,9 @@ fetch_main () {
346
351
rsync -L -q " $remote /$remote_name " " $TMP_HEAD " || exit 1
347
352
head=$( git-rev-parse --verify TMP_HEAD)
348
353
rm -f " $TMP_HEAD "
354
+ case " $quiet " in ' ' ) v=-v ;; * ) v= ;; esac
349
355
test " $rsync_slurped_objects " || {
350
- rsync -av --ignore-existing --exclude info \
356
+ rsync -a $v --ignore-existing --exclude info \
351
357
" $remote /objects/" " $GIT_OBJECT_DIRECTORY /" || exit
352
358
353
359
# Look at objects/info/alternates for rsync -- http will
@@ -394,8 +400,8 @@ fetch_main () {
394
400
git-bundle unbundle " $remote " $rref ||
395
401
echo failed " $remote "
396
402
else
397
- git-fetch-pack --thin $exec $keep $shallow_depth $no_progress \
398
- " $remote " $rref ||
403
+ git-fetch-pack --thin $exec $keep $shallow_depth \
404
+ $quiet $no_progress " $remote " $rref ||
399
405
echo failed " $remote "
400
406
fi
401
407
) |
0 commit comments