@@ -433,12 +433,16 @@ clone_repo() {
433
433
local reponame=" $1 "
434
434
local dir=" $2 "
435
435
echo " clone local git repository $reponame to $dir "
436
- out=$( git clone " $GITSERVER /$reponame " " $dir " 2>&1 )
436
+ git clone " $GITSERVER /$reponame " " $dir " 2>&1 | tee clone.log
437
+
438
+ if [ " 0" -ne " ${PIPESTATUS[0]} " ]; then
439
+ return 1
440
+ fi
441
+
437
442
cd " $dir "
443
+ mv ../clone.log .
438
444
439
445
git config credential.helper lfstest
440
- echo " $out " > clone.log
441
- echo " $out "
442
446
}
443
447
444
448
# clone_repo_url clones a Git repository to the subdirectory $dir under $TRASHDIR.
@@ -449,12 +453,16 @@ clone_repo_url() {
449
453
local repo=" $1 "
450
454
local dir=" $2 "
451
455
echo " clone git repository $repo to $dir "
452
- out=$( git clone " $repo " " $dir " 2>&1 )
456
+ git clone " $repo " " $dir " 2>&1 | tee clone.log
457
+
458
+ if [ " 0" -ne " ${PIPESTATUS[0]} " ]; then
459
+ return 1
460
+ fi
461
+
453
462
cd " $dir "
463
+ mv ../clone.log .
454
464
455
465
git config credential.helper lfstest
456
- echo " $out " > clone.log
457
- echo " $out "
458
466
}
459
467
460
468
# clone_repo_ssl clones a repository from the test Git server to the subdirectory
@@ -466,13 +474,16 @@ clone_repo_ssl() {
466
474
local reponame=" $1 "
467
475
local dir=" $2 "
468
476
echo " clone local git repository $reponame to $dir "
469
- out=$( git clone " $SSLGITSERVER /$reponame " " $dir " 2>&1 )
477
+ git clone " $SSLGITSERVER /$reponame " " $dir " 2>&1 | tee clone_ssl.log
478
+
479
+ if [ " 0" -ne " ${PIPESTATUS[0]} " ]; then
480
+ return 1
481
+ fi
482
+
470
483
cd " $dir "
484
+ mv ../clone_ssl.log .
471
485
472
486
git config credential.helper lfstest
473
-
474
- echo " $out " > clone_ssl.log
475
- echo " $out "
476
487
}
477
488
478
489
# clone_repo_clientcert clones a repository from the test Git server to the subdirectory
@@ -484,26 +495,16 @@ clone_repo_clientcert() {
484
495
local reponame=" $1 "
485
496
local dir=" $2 "
486
497
echo " clone $CLIENTCERTGITSERVER /$reponame to $dir "
487
- set +e
488
- out=$( git clone " $CLIENTCERTGITSERVER /$reponame " " $dir " 2>&1 )
489
- res=" ${PIPESTATUS[0]} "
490
- set -e
491
-
492
- if [ " 0" -eq " $res " ]; then
493
- cd " $dir "
494
- echo " $out " > clone_client_cert.log
498
+ git clone " $CLIENTCERTGITSERVER /$reponame " " $dir " 2>&1 | tee clone_client_cert.log
495
499
496
- git config credential.helper lfstest
497
- return 0
500
+ if [ " 0 " -ne " ${PIPESTATUS[0]} " ] ; then
501
+ return 1
498
502
fi
499
503
500
- echo " $out " > clone_client_cert.log
501
- if [ $( grep -c " NSInvalidArgumentException" clone_client_cert.log) -gt 0 ]; then
502
- echo " client-cert-mac-openssl" > clone_client_cert.log
503
- return 0
504
- fi
504
+ cd " $dir "
505
+ mv ../clone_client_cert.log .
505
506
506
- return 1
507
+ git config credential.helper lfstest
507
508
}
508
509
509
510
# setup_remote_repo_with_file creates a remote repo, clones it locally, commits
0 commit comments