5 envInitConfig='git config filter.lfs.process = "git-lfs filter-process"
6 git config filter.lfs.smudge = "git-lfs smudge -- %f"
7 git config filter.lfs.clean = "git-lfs clean -- %f"'
9 begin_test "env with no remote"
12 reponame="env-no-remote"
17 localwd=$(native_path "$TRASHDIR/$reponame")
18 localgit=$(native_path "$TRASHDIR/$reponame/.git")
19 localgitstore=$(native_path "$TRASHDIR/$reponame/.git")
20 lfsstorage=$(native_path "$TRASHDIR/$reponame/.git/lfs")
21 localmedia=$(native_path "$TRASHDIR/$reponame/.git/lfs/objects")
22 tempdir=$(native_path "$TRASHDIR/$reponame/.git/lfs/tmp")
23 envVars=$(printf "%s" "$(env | grep "^GIT")")
36 BasicTransfersOnly=false
37 SkipDownloadErrors=false
38 FetchRecentAlways=false
40 FetchRecentCommitsDays=0
41 FetchRecentRefsIncludeRemotes=true
43 PruneVerifyRemoteAlways=false
44 PruneRemoteName=origin
48 DownloadTransfers=basic
52 ' "$(git lfs version)" "$(git version)" "$localwd" "$localgit" "$localgitstore" "$localmedia" "$tempdir" "$lfsstorage" "$envVars" "$envInitConfig")
53 actual=$(git lfs env | grep -v "^GIT_EXEC_PATH=")
55 contains_same_elements "$expected" "$actual"
59 begin_test "env with origin remote"
62 reponame="env-origin-remote"
66 git remote add origin "$GITSERVER/env-origin-remote"
68 endpoint="$GITSERVER/$reponame.git/info/lfs (auth=none)"
69 localwd=$(native_path "$TRASHDIR/$reponame")
70 localgit=$(native_path "$TRASHDIR/$reponame/.git")
71 localgitstore=$(native_path "$TRASHDIR/$reponame/.git")
72 lfsstorage=$(native_path "$TRASHDIR/$reponame/.git/lfs")
73 localmedia=$(native_path "$TRASHDIR/$reponame/.git/lfs/objects")
74 tempdir=$(native_path "$TRASHDIR/$reponame/.git/lfs/tmp")
75 envVars=$(printf "%s" "$(env | grep "^GIT")")
88 BasicTransfersOnly=false
89 SkipDownloadErrors=false
90 FetchRecentAlways=false
92 FetchRecentCommitsDays=0
93 FetchRecentRefsIncludeRemotes=true
95 PruneVerifyRemoteAlways=false
96 PruneRemoteName=origin
100 DownloadTransfers=basic
101 UploadTransfers=basic
104 ' "$(git lfs version)" "$(git version)" "$endpoint" "$localwd" "$localgit" "$localgitstore" "$localmedia" "$tempdir" "$lfsstorage" "$envVars" "$envInitConfig")
105 actual=$(git lfs env | grep -v "^GIT_EXEC_PATH=")
106 contains_same_elements "$expected" "$actual"
109 expected2=$(echo "$expected" | sed -e 's/LocalWorkingDir=.*/LocalWorkingDir=/')
110 actual2=$(git lfs env | grep -v "^GIT_EXEC_PATH=")
111 contains_same_elements "$expected2" "$actual2"
115 begin_test "env with multiple remotes"
118 reponame="env-multiple-remotes"
122 git remote add origin "$GITSERVER/env-origin-remote"
123 git remote add other "$GITSERVER/env-other-remote"
125 endpoint="$GITSERVER/env-origin-remote.git/info/lfs (auth=none)"
126 endpoint2="$GITSERVER/env-other-remote.git/info/lfs (auth=none)"
127 localwd=$(native_path "$TRASHDIR/$reponame")
128 localgit=$(native_path "$TRASHDIR/$reponame/.git")
129 localgitstore=$(native_path "$TRASHDIR/$reponame/.git")
130 lfsstorage=$(native_path "$TRASHDIR/$reponame/.git/lfs")
131 localmedia=$(native_path "$TRASHDIR/$reponame/.git/lfs/objects")
132 tempdir=$(native_path "$TRASHDIR/$reponame/.git/lfs/tmp")
133 envVars=$(printf "%s" "$(env | grep "^GIT")")
134 expected=$(printf '%s
141 LocalGitStorageDir=%s
145 ConcurrentTransfers=3
147 BasicTransfersOnly=false
148 SkipDownloadErrors=false
149 FetchRecentAlways=false
150 FetchRecentRefsDays=7
151 FetchRecentCommitsDays=0
152 FetchRecentRefsIncludeRemotes=true
154 PruneVerifyRemoteAlways=false
155 PruneRemoteName=origin
159 DownloadTransfers=basic
160 UploadTransfers=basic
163 ' "$(git lfs version)" "$(git version)" "$endpoint" "$endpoint2" "$localwd" "$localgit" "$localgitstore" "$localmedia" "$tempdir" "$lfsstorage" "$envVars" "$envInitConfig")
164 actual=$(git lfs env | grep -v "^GIT_EXEC_PATH=")
165 contains_same_elements "$expected" "$actual"
168 expected2=$(echo "$expected" | sed -e 's/LocalWorkingDir=.*/LocalWorkingDir=/')
169 actual2=$(git lfs env | grep -v "^GIT_EXEC_PATH=")
170 contains_same_elements "$expected2" "$actual2"
174 begin_test "env with other remote"
177 reponame="env-other-remote"
181 git remote add other "$GITSERVER/env-other-remote"
183 endpoint="$GITSERVER/env-other-remote.git/info/lfs (auth=none)"
184 localwd=$(native_path "$TRASHDIR/$reponame")
185 localgit=$(native_path "$TRASHDIR/$reponame/.git")
186 localgitstore=$(native_path "$TRASHDIR/$reponame/.git")
187 lfsstorage=$(native_path "$TRASHDIR/$reponame/.git/lfs")
188 localmedia=$(native_path "$TRASHDIR/$reponame/.git/lfs/objects")
189 tempdir=$(native_path "$TRASHDIR/$reponame/.git/lfs/tmp")
190 envVars=$(printf "%s" "$(env | grep "^GIT")")
192 expected=$(printf '%s
198 LocalGitStorageDir=%s
202 ConcurrentTransfers=3
204 BasicTransfersOnly=false
205 SkipDownloadErrors=false
206 FetchRecentAlways=false
207 FetchRecentRefsDays=7
208 FetchRecentCommitsDays=0
209 FetchRecentRefsIncludeRemotes=true
211 PruneVerifyRemoteAlways=false
212 PruneRemoteName=origin
216 DownloadTransfers=basic
217 UploadTransfers=basic
220 ' "$(git lfs version)" "$(git version)" "$endpoint" "$localwd" "$localgit" "$localgitstore" "$localmedia" "$tempdir" "$lfsstorage" "$envVars" "$envInitConfig")
221 actual=$(git lfs env | grep -v "^GIT_EXEC_PATH=")
222 contains_same_elements "$expected" "$actual"
225 expected2=$(echo "$expected" | sed -e 's/LocalWorkingDir=.*/LocalWorkingDir=/')
226 actual2=$(git lfs env | grep -v "^GIT_EXEC_PATH=")
227 contains_same_elements "$expected2" "$actual2"
231 begin_test "env with multiple remotes and lfs.url config"
234 reponame="env-multiple-remotes-with-lfs-url"
238 git remote add origin "$GITSERVER/env-origin-remote"
239 git remote add other "$GITSERVER/env-other-remote"
240 git config lfs.url "http://foo/bar"
242 endpoint="$GITSERVER/env-other-remote.git/info/lfs (auth=none)"
243 localwd=$(native_path "$TRASHDIR/$reponame")
244 localgit=$(native_path "$TRASHDIR/$reponame/.git")
245 localgitstore=$(native_path "$TRASHDIR/$reponame/.git")
246 lfsstorage=$(native_path "$TRASHDIR/$reponame/.git/lfs")
247 localmedia=$(native_path "$TRASHDIR/$reponame/.git/lfs/objects")
248 tempdir=$(native_path "$TRASHDIR/$reponame/.git/lfs/tmp")
249 envVars=$(printf "%s" "$(env | grep "^GIT")")
250 expected=$(printf '%s
253 Endpoint=http://foo/bar (auth=none)
257 LocalGitStorageDir=%s
261 ConcurrentTransfers=3
263 BasicTransfersOnly=false
264 SkipDownloadErrors=false
265 FetchRecentAlways=false
266 FetchRecentRefsDays=7
267 FetchRecentCommitsDays=0
268 FetchRecentRefsIncludeRemotes=true
270 PruneVerifyRemoteAlways=false
271 PruneRemoteName=origin
275 DownloadTransfers=basic
276 UploadTransfers=basic
279 ' "$(git lfs version)" "$(git version)" "$endpoint" "$localwd" "$localgit" "$localgitstore" "$localmedia" "$tempdir" "$lfsstorage" "$envVars" "$envInitConfig")
280 actual=$(git lfs env | grep -v "^GIT_EXEC_PATH=")
281 contains_same_elements "$expected" "$actual"
284 expected2=$(echo "$expected" | sed -e 's/LocalWorkingDir=.*/LocalWorkingDir=/')
285 actual2=$(git lfs env | grep -v "^GIT_EXEC_PATH=")
286 contains_same_elements "$expected2" "$actual2"
290 begin_test "env with multiple remotes and lfs configs"
293 reponame="env-multiple-remotes-lfs-configs"
297 git remote add origin "$GITSERVER/env-origin-remote"
298 git remote add other "$GITSERVER/env-other-remote"
299 git config lfs.url "http://foo/bar"
300 git config remote.origin.lfsurl "http://custom/origin"
301 git config remote.other.lfsurl "http://custom/other"
303 localwd=$(native_path "$TRASHDIR/$reponame")
304 localgit=$(native_path "$TRASHDIR/$reponame/.git")
305 localgitstore=$(native_path "$TRASHDIR/$reponame/.git")
306 lfsstorage=$(native_path "$TRASHDIR/$reponame/.git/lfs")
307 localmedia=$(native_path "$TRASHDIR/$reponame/.git/lfs/objects")
308 tempdir=$(native_path "$TRASHDIR/$reponame/.git/lfs/tmp")
309 envVars=$(printf "%s" "$(env | grep "^GIT")")
310 expected=$(printf '%s
313 Endpoint=http://foo/bar (auth=none)
314 Endpoint (other)=http://custom/other (auth=none)
317 LocalGitStorageDir=%s
321 ConcurrentTransfers=3
323 BasicTransfersOnly=false
324 SkipDownloadErrors=false
325 FetchRecentAlways=false
326 FetchRecentRefsDays=7
327 FetchRecentCommitsDays=0
328 FetchRecentRefsIncludeRemotes=true
330 PruneVerifyRemoteAlways=false
331 PruneRemoteName=origin
335 DownloadTransfers=basic
336 UploadTransfers=basic
339 ' "$(git lfs version)" "$(git version)" "$localwd" "$localgit" "$localgitstore" "$localmedia" "$tempdir" "$lfsstorage" "$envVars" "$envInitConfig")
340 actual=$(git lfs env | grep -v "^GIT_EXEC_PATH=")
341 contains_same_elements "$expected" "$actual"
344 expected2=$(echo "$expected" | sed -e 's/LocalWorkingDir=.*/LocalWorkingDir=/')
345 actual2=$(git lfs env | grep -v "^GIT_EXEC_PATH=")
346 contains_same_elements "$expected2" "$actual2"
350 begin_test "env with multiple remotes and lfs url and batch configs"
353 reponame="env-multiple-remotes-lfs-batch-configs"
357 git remote add origin "$GITSERVER/env-origin-remote"
358 git remote add other "$GITSERVER/env-other-remote"
359 git config lfs.url "http://foo/bar"
360 git config lfs.concurrenttransfers 5
361 git config remote.origin.lfsurl "http://custom/origin"
362 git config remote.other.lfsurl "http://custom/other"
364 localwd=$(native_path "$TRASHDIR/$reponame")
365 localgit=$(native_path "$TRASHDIR/$reponame/.git")
366 localgitstore=$(native_path "$TRASHDIR/$reponame/.git")
367 lfsstorage=$(native_path "$TRASHDIR/$reponame/.git/lfs")
368 localmedia=$(native_path "$TRASHDIR/$reponame/.git/lfs/objects")
369 tempdir=$(native_path "$TRASHDIR/$reponame/.git/lfs/tmp")
370 envVars=$(printf "%s" "$(env | grep "^GIT")")
371 expected=$(printf '%s
374 Endpoint=http://foo/bar (auth=none)
375 Endpoint (other)=http://custom/other (auth=none)
378 LocalGitStorageDir=%s
382 ConcurrentTransfers=5
384 BasicTransfersOnly=false
385 SkipDownloadErrors=false
386 FetchRecentAlways=false
387 FetchRecentRefsDays=7
388 FetchRecentCommitsDays=0
389 FetchRecentRefsIncludeRemotes=true
391 PruneVerifyRemoteAlways=false
392 PruneRemoteName=origin
396 DownloadTransfers=basic
397 UploadTransfers=basic
400 ' "$(git lfs version)" "$(git version)" "$localwd" "$localgit" "$localgitstore" "$localmedia" "$tempdir" "$lfsstorage" "$envVars" "$envInitConfig")
401 actual=$(git lfs env | grep -v "^GIT_EXEC_PATH=")
402 contains_same_elements "$expected" "$actual"
405 expected2=$(echo "$expected" | sed -e 's/LocalWorkingDir=.*/LocalWorkingDir=/')
406 actual2=$(git lfs env | grep -v "^GIT_EXEC_PATH=")
407 contains_same_elements "$expected2" "$actual2"
411 begin_test "env with .lfsconfig"
414 reponame="env-with-lfsconfig"
419 git remote add origin "$GITSERVER/env-origin-remote"
420 echo '[remote "origin"]
421 lfsurl = http://foobar:8080/
424 concurrenttransfers = 5
426 echo '[remote "origin"]
427 lfsurl = http://foobar:5050/
430 concurrenttransfers = 50
433 localwd=$(native_path "$TRASHDIR/$reponame")
434 localgit=$(native_path "$TRASHDIR/$reponame/.git")
435 localgitstore=$(native_path "$TRASHDIR/$reponame/.git")
436 lfsstorage=$(native_path "$TRASHDIR/$reponame/.git/lfs")
437 localmedia=$(native_path "$TRASHDIR/$reponame/.git/lfs/objects")
438 tempdir=$(native_path "$TRASHDIR/$reponame/.git/lfs/tmp")
439 envVars=$(printf "%s" "$(env | grep "^GIT")")
440 expected=$(printf '%s
443 Endpoint=http://foobar:8080/ (auth=none)
446 LocalGitStorageDir=%s
450 ConcurrentTransfers=3
452 BasicTransfersOnly=false
453 SkipDownloadErrors=false
454 FetchRecentAlways=false
455 FetchRecentRefsDays=7
456 FetchRecentCommitsDays=0
457 FetchRecentRefsIncludeRemotes=true
459 PruneVerifyRemoteAlways=false
460 PruneRemoteName=origin
464 DownloadTransfers=basic
465 UploadTransfers=basic
468 ' "$(git lfs version)" "$(git version)" "$localwd" "$localgit" "$localgitstore" "$localmedia" "$tempdir" "$lfsstorage" "$envVars" "$envInitConfig")
469 actual=$(git lfs env | grep -v "^GIT_EXEC_PATH=")
470 contains_same_elements "$expected" "$actual"
474 actual2=$(git lfs env | grep -v "^GIT_EXEC_PATH=")
475 contains_same_elements "$expected" "$actual2"
479 begin_test "env with environment variables"
482 reponame="env-with-envvars"
484 mkdir -p $reponame/a/b/c
486 gitDir=$(native_path "$TRASHDIR/$reponame/.git")
487 workTree=$(native_path "$TRASHDIR/$reponame/a/b")
489 localwd=$(native_path "$TRASHDIR/$reponame/a/b")
490 localgit=$(native_path "$TRASHDIR/$reponame/.git")
491 localgitstore=$(native_path "$TRASHDIR/$reponame/.git")
492 lfsstorage=$(native_path "$TRASHDIR/$reponame/.git/lfs")
493 localmedia=$(native_path "$TRASHDIR/$reponame/.git/lfs/objects")
494 tempdir=$(native_path "$TRASHDIR/$reponame/.git/lfs/tmp")
495 envVars="$(GIT_DIR=$gitDir GIT_WORK_TREE=$workTree env | grep "^GIT" | sort)"
496 expected=$(printf '%s
501 LocalGitStorageDir=%s
505 ConcurrentTransfers=3
507 BasicTransfersOnly=false
508 SkipDownloadErrors=false
509 FetchRecentAlways=false
510 FetchRecentRefsDays=7
511 FetchRecentCommitsDays=0
512 FetchRecentRefsIncludeRemotes=true
514 PruneVerifyRemoteAlways=false
515 PruneRemoteName=origin
519 DownloadTransfers=basic
520 UploadTransfers=basic
523 ' "$(git lfs version)" "$(git version)" "$localwd" "$localgit" "$localgitstore" "$localmedia" "$tempdir" "$lfsstorage" "$envVars" "$envInitConfig")
525 actual=$(GIT_DIR=$gitDir GIT_WORK_TREE=$workTree git lfs env \
526 | grep -v "^GIT_EXEC_PATH=")
527 contains_same_elements "$expected" "$actual"
529 cd $TRASHDIR/$reponame
530 actual2=$(GIT_DIR=$gitDir GIT_WORK_TREE=$workTree git lfs env \
531 | grep -v "^GIT_EXEC_PATH=")
532 contains_same_elements "$expected" "$actual2"
534 cd $TRASHDIR/$reponame/.git
535 actual3=$(GIT_DIR=$gitDir GIT_WORK_TREE=$workTree git lfs env \
536 | grep -v "^GIT_EXEC_PATH=")
537 contains_same_elements "$expected" "$actual3"
539 cd $TRASHDIR/$reponame/a/b/c
540 actual4=$(GIT_DIR=$gitDir GIT_WORK_TREE=$workTree git lfs env \
541 | grep -v "^GIT_EXEC_PATH=")
542 contains_same_elements "$expected" "$actual4"
544 envVars="$(GIT_DIR=$gitDir GIT_WORK_TREE=a/b env | grep "^GIT" | sort)"
545 expected5=$(printf '%s
550 LocalGitStorageDir=%s
554 ConcurrentTransfers=3
556 BasicTransfersOnly=false
557 SkipDownloadErrors=false
558 FetchRecentAlways=false
559 FetchRecentRefsDays=7
560 FetchRecentCommitsDays=0
561 FetchRecentRefsIncludeRemotes=true
563 PruneVerifyRemoteAlways=false
564 PruneRemoteName=origin
568 DownloadTransfers=basic
569 UploadTransfers=basic
571 ' "$(git lfs version)" "$(git version)" "$localwd" "$localgit" "$localgitstore" "$localmedia" "$tempdir" "$lfsstorage" "$envVars")
572 actual5=$(GIT_DIR=$gitDir GIT_WORK_TREE=a/b git lfs env \
573 | grep -v "^GIT_EXEC_PATH=")
574 contains_same_elements "$expected5" "$actual5"
576 cd $TRASHDIR/$reponame/a/b
577 envVars="$(GIT_DIR=$gitDir env | grep "^GIT" | sort)"
578 expected7=$(printf '%s
583 LocalGitStorageDir=%s
587 ConcurrentTransfers=3
589 BasicTransfersOnly=false
590 SkipDownloadErrors=false
591 FetchRecentAlways=false
592 FetchRecentRefsDays=7
593 FetchRecentCommitsDays=0
594 FetchRecentRefsIncludeRemotes=true
596 PruneVerifyRemoteAlways=false
597 PruneRemoteName=origin
601 DownloadTransfers=basic
602 UploadTransfers=basic
605 ' "$(git lfs version)" "$(git version)" "$localwd" "$localgit" "$localgitstore" "$localmedia" "$tempdir" "$lfsstorage" "$envVars" "$envInitConfig")
606 actual7=$(GIT_DIR=$gitDir git lfs env | grep -v "^GIT_EXEC_PATH=")
607 contains_same_elements "$expected7" "$actual7"
609 cd $TRASHDIR/$reponame/a
610 envVars="$(GIT_WORK_TREE=$workTree env | grep "^GIT" | sort)"
611 expected8=$(printf '%s
616 LocalGitStorageDir=%s
620 ConcurrentTransfers=3
622 BasicTransfersOnly=false
623 SkipDownloadErrors=false
624 FetchRecentAlways=false
625 FetchRecentRefsDays=7
626 FetchRecentCommitsDays=0
627 FetchRecentRefsIncludeRemotes=true
629 PruneVerifyRemoteAlways=false
630 PruneRemoteName=origin
634 DownloadTransfers=basic
635 UploadTransfers=basic
638 ' "$(git lfs version)" "$(git version)" "$localwd" "$localgit" "$localgitstore" "$localmedia" "$tempdir" "$lfsstorage" "$envVars" "$envInitConfig")
639 actual8=$(GIT_WORK_TREE=$workTree git lfs env | grep -v "^GIT_EXEC_PATH=")
640 contains_same_elements "$expected8" "$actual8"
644 begin_test "env with bare repo"
647 reponame="env-with-bare-repo"
648 git init --bare $reponame
651 localgit=$(native_path "$TRASHDIR/$reponame")
652 localgitstore=$(native_path "$TRASHDIR/$reponame")
653 lfsstorage=$(native_path "$TRASHDIR/$reponame/lfs")
654 localmedia=$(native_path "$TRASHDIR/$reponame/lfs/objects")
655 tempdir=$(native_path "$TRASHDIR/$reponame/lfs/tmp")
656 envVars=$(printf "%s" "$(env | grep "^GIT")")
658 expected=$(printf "%s\n%s\n
661 LocalGitStorageDir=%s
665 ConcurrentTransfers=3
667 BasicTransfersOnly=false
668 SkipDownloadErrors=false
669 FetchRecentAlways=false
670 FetchRecentRefsDays=7
671 FetchRecentCommitsDays=0
672 FetchRecentRefsIncludeRemotes=true
674 PruneVerifyRemoteAlways=false
675 PruneRemoteName=origin
679 DownloadTransfers=basic
680 UploadTransfers=basic
683 " "$(git lfs version)" "$(git version)" "$localgit" "$localgitstore" "$localmedia" "$tempdir" "$lfsstorage" "$envVars" "$envInitConfig")
684 actual=$(git lfs env | grep -v "^GIT_EXEC_PATH=")
685 contains_same_elements "$expected" "$actual"
690 begin_test "env with multiple ssh remotes"
693 reponame="env-with-ssh"
697 git remote add origin git@git-server.com:user/repo.git
698 git remote add other git@other-git-server.com:user/repo.git
700 expected='Endpoint=https://git-server.com/user/repo.git/info/lfs (auth=none)
701 SSH=git@git-server.com:user/repo.git
702 Endpoint (other)=https://other-git-server.com/user/repo.git/info/lfs (auth=none)
703 SSH=git@other-git-server.com:user/repo.git
704 GIT_SSH=lfs-ssh-echo'
706 contains_same_elements "$expected" "$(git lfs env \
707 | grep -v "^GIT_EXEC_PATH=" | grep -e "Endpoint" -e "SSH=")"
711 begin_test "env with skip download errors"
714 reponame="env-with-skip-dl"
718 git config lfs.skipdownloaderrors 1
720 localgit=$(native_path "$TRASHDIR/$reponame")
721 localgitstore=$(native_path "$TRASHDIR/$reponame")
722 lfsstorage=$(native_path "$TRASHDIR/$reponame/lfs")
723 localmedia=$(native_path "$TRASHDIR/$reponame/lfs/objects")
724 tempdir=$(native_path "$TRASHDIR/$reponame/lfs/tmp")
725 envVars=$(printf "%s" "$(env | grep "^GIT")")
727 localwd=$(native_path "$TRASHDIR/$reponame")
728 localgit=$(native_path "$TRASHDIR/$reponame/.git")
729 localgitstore=$(native_path "$TRASHDIR/$reponame/.git")
730 lfsstorage=$(native_path "$TRASHDIR/$reponame/.git/lfs")
731 localmedia=$(native_path "$TRASHDIR/$reponame/.git/lfs/objects")
732 tempdir=$(native_path "$TRASHDIR/$reponame/.git/lfs/tmp")
733 envVars=$(printf "%s" "$(env | grep "^GIT")")
735 expectedenabled=$(printf '%s
740 LocalGitStorageDir=%s
744 ConcurrentTransfers=3
746 BasicTransfersOnly=false
747 SkipDownloadErrors=true
748 FetchRecentAlways=false
749 FetchRecentRefsDays=7
750 FetchRecentCommitsDays=0
751 FetchRecentRefsIncludeRemotes=true
753 PruneVerifyRemoteAlways=false
754 PruneRemoteName=origin
758 DownloadTransfers=basic
759 UploadTransfers=basic
762 ' "$(git lfs version)" "$(git version)" "$localwd" "$localgit" "$localgitstore" "$localmedia" "$tempdir" "$lfsstorage" "$envVars" "$envInitConfig")
763 actual=$(git lfs env | grep -v "^GIT_EXEC_PATH=")
764 contains_same_elements "$expectedenabled" "$actual"
766 git config --unset lfs.skipdownloaderrors
767 # prove it's usually off
768 expecteddisabled=$(printf '%s
773 LocalGitStorageDir=%s
777 ConcurrentTransfers=3
779 BasicTransfersOnly=false
780 SkipDownloadErrors=true
781 FetchRecentAlways=false
782 FetchRecentRefsDays=7
783 FetchRecentCommitsDays=0
784 FetchRecentRefsIncludeRemotes=true
786 PruneVerifyRemoteAlways=false
787 PruneRemoteName=origin
791 DownloadTransfers=basic
792 UploadTransfers=basic
795 ' "$(git lfs version)" "$(git version)" "$localwd" "$localgit" "$localgitstore" "$localmedia" "$tempdir" "$lfsstorage" "$envVars" "$envInitConfig")
796 actual=$(git lfs env | grep -v "^GIT_EXEC_PATH=")
797 contains_same_elements "$expecteddisabled" "$actual"
799 # now enable via env var
800 actual=$(GIT_LFS_SKIP_DOWNLOAD_ERRORS=1 git lfs env | grep -v "^GIT_EXEC_PATH=")
801 contains_same_elements "$expectedenabled" "$actual"
809 begin_test "env with extra transfer methods"
812 reponame="env-with-transfers"
816 git config lfs.tustransfers true
817 git config lfs.customtransfer.supertransfer.path /path/to/something
819 localgit=$(native_path "$TRASHDIR/$reponame")
820 localgitstore=$(native_path "$TRASHDIR/$reponame")
821 lfsstorage=$(native_path "$TRASHDIR/$reponame/lfs")
822 localmedia=$(native_path "$TRASHDIR/$reponame/lfs/objects")
823 tempdir=$(native_path "$TRASHDIR/$reponame/lfs/tmp")
824 envVars=$(printf "%s" "$(env | grep "^GIT")")
826 localwd=$(native_path "$TRASHDIR/$reponame")
827 localgit=$(native_path "$TRASHDIR/$reponame/.git")
828 localgitstore=$(native_path "$TRASHDIR/$reponame/.git")
829 lfsstorage=$(native_path "$TRASHDIR/$reponame/.git/lfs")
830 localmedia=$(native_path "$TRASHDIR/$reponame/.git/lfs/objects")
831 tempdir=$(native_path "$TRASHDIR/$reponame/.git/lfs/tmp")
832 envVars=$(printf "%s" "$(env | grep "^GIT")")
834 expectedenabled=$(printf '%s
839 LocalGitStorageDir=%s
843 ConcurrentTransfers=3
845 BasicTransfersOnly=false
846 SkipDownloadErrors=false
847 FetchRecentAlways=false
848 FetchRecentRefsDays=7
849 FetchRecentCommitsDays=0
850 FetchRecentRefsIncludeRemotes=true
852 PruneVerifyRemoteAlways=false
853 PruneRemoteName=origin
857 DownloadTransfers=basic,supertransfer
858 UploadTransfers=basic,supertransfer,tus
861 ' "$(git lfs version)" "$(git version)" "$localwd" "$localgit" "$localgitstore" "$localmedia" "$tempdir" "$lfsstorage" "$envVars" "$envInitConfig")
862 actual=$(git lfs env | grep -v "^GIT_EXEC_PATH=")
863 contains_same_elements "$expectedenabled" "$actual"