2015-07-30 02:37:31 +00:00
|
|
|
#!/usr/bin/env bash
|
2015-05-26 17:48:24 +00:00
|
|
|
|
2018-07-10 18:48:02 +00:00
|
|
|
. "$(dirname "$0")/testlib.sh"
|
2015-05-26 17:48:24 +00:00
|
|
|
|
2016-11-08 20:05:12 +00:00
|
|
|
envInitConfig='git config filter.lfs.process = "git-lfs filter-process"
|
2016-10-24 06:13:49 +00:00
|
|
|
git config filter.lfs.smudge = "git-lfs smudge -- %f"
|
2016-03-17 21:25:33 +00:00
|
|
|
git config filter.lfs.clean = "git-lfs clean -- %f"'
|
2015-09-23 20:02:22 +00:00
|
|
|
|
2019-08-26 20:42:08 +00:00
|
|
|
unset_vars() {
|
|
|
|
# If set, these will cause the test to fail.
|
|
|
|
unset GIT_LFS_NO_TEST_COUNT GIT_LFS_LOCK_ACQUIRE_DISABLED
|
|
|
|
}
|
|
|
|
|
2015-05-26 17:48:24 +00:00
|
|
|
begin_test "env with no remote"
|
|
|
|
(
|
|
|
|
set -e
|
|
|
|
reponame="env-no-remote"
|
2019-08-26 20:42:08 +00:00
|
|
|
unset_vars
|
2015-05-26 17:48:24 +00:00
|
|
|
mkdir $reponame
|
|
|
|
cd $reponame
|
|
|
|
git init
|
|
|
|
|
2019-08-30 19:19:24 +00:00
|
|
|
localwd=$(canonical_path "$TRASHDIR/$reponame")
|
|
|
|
localgit=$(canonical_path "$TRASHDIR/$reponame/.git")
|
|
|
|
localgitstore=$(canonical_path "$TRASHDIR/$reponame/.git")
|
|
|
|
lfsstorage=$(canonical_path "$TRASHDIR/$reponame/.git/lfs")
|
|
|
|
localmedia=$(canonical_path "$TRASHDIR/$reponame/.git/lfs/objects")
|
|
|
|
tempdir=$(canonical_path "$TRASHDIR/$reponame/.git/lfs/tmp")
|
2015-10-20 16:24:04 +00:00
|
|
|
envVars=$(printf "%s" "$(env | grep "^GIT")")
|
2015-10-16 12:28:34 +00:00
|
|
|
|
|
|
|
expected=$(printf '%s
|
|
|
|
%s
|
|
|
|
|
|
|
|
LocalWorkingDir=%s
|
|
|
|
LocalGitDir=%s
|
|
|
|
LocalGitStorageDir=%s
|
|
|
|
LocalMediaDir=%s
|
2018-07-09 15:28:23 +00:00
|
|
|
LocalReferenceDirs=
|
2015-10-16 12:28:34 +00:00
|
|
|
TempDir=%s
|
2019-12-12 10:10:24 +00:00
|
|
|
ConcurrentTransfers=8
|
2016-07-26 14:52:15 +00:00
|
|
|
TusTransfers=false
|
2016-06-09 10:45:24 +00:00
|
|
|
BasicTransfersOnly=false
|
2016-05-10 10:39:09 +00:00
|
|
|
SkipDownloadErrors=false
|
2016-05-12 15:03:03 +00:00
|
|
|
FetchRecentAlways=false
|
|
|
|
FetchRecentRefsDays=7
|
|
|
|
FetchRecentCommitsDays=0
|
|
|
|
FetchRecentRefsIncludeRemotes=true
|
|
|
|
PruneOffsetDays=3
|
|
|
|
PruneVerifyRemoteAlways=false
|
|
|
|
PruneRemoteName=origin
|
2017-03-10 11:27:52 +00:00
|
|
|
LfsStorageDir=%s
|
2016-05-12 15:03:03 +00:00
|
|
|
AccessDownload=none
|
|
|
|
AccessUpload=none
|
2019-07-31 13:46:39 +00:00
|
|
|
DownloadTransfers=basic,lfs-standalone-file
|
|
|
|
UploadTransfers=basic,lfs-standalone-file
|
2015-10-21 09:58:18 +00:00
|
|
|
%s
|
|
|
|
%s
|
2017-03-10 11:27:52 +00:00
|
|
|
' "$(git lfs version)" "$(git version)" "$localwd" "$localgit" "$localgitstore" "$localmedia" "$tempdir" "$lfsstorage" "$envVars" "$envInitConfig")
|
2018-05-21 20:51:10 +00:00
|
|
|
actual=$(git lfs env | grep -v "^GIT_EXEC_PATH=")
|
2015-10-21 09:58:18 +00:00
|
|
|
|
|
|
|
contains_same_elements "$expected" "$actual"
|
2015-05-26 17:48:24 +00:00
|
|
|
)
|
|
|
|
end_test
|
|
|
|
|
|
|
|
begin_test "env with origin remote"
|
|
|
|
(
|
|
|
|
set -e
|
|
|
|
reponame="env-origin-remote"
|
2019-08-26 20:42:08 +00:00
|
|
|
unset_vars
|
2015-05-26 17:48:24 +00:00
|
|
|
mkdir $reponame
|
|
|
|
cd $reponame
|
|
|
|
git init
|
|
|
|
git remote add origin "$GITSERVER/env-origin-remote"
|
|
|
|
|
2015-10-16 13:16:52 +00:00
|
|
|
endpoint="$GITSERVER/$reponame.git/info/lfs (auth=none)"
|
2019-08-30 19:19:24 +00:00
|
|
|
localwd=$(canonical_path "$TRASHDIR/$reponame")
|
|
|
|
localgit=$(canonical_path "$TRASHDIR/$reponame/.git")
|
|
|
|
localgitstore=$(canonical_path "$TRASHDIR/$reponame/.git")
|
|
|
|
lfsstorage=$(canonical_path "$TRASHDIR/$reponame/.git/lfs")
|
|
|
|
localmedia=$(canonical_path "$TRASHDIR/$reponame/.git/lfs/objects")
|
|
|
|
tempdir=$(canonical_path "$TRASHDIR/$reponame/.git/lfs/tmp")
|
2015-10-20 16:24:04 +00:00
|
|
|
envVars=$(printf "%s" "$(env | grep "^GIT")")
|
2015-10-16 13:16:52 +00:00
|
|
|
expected=$(printf '%s
|
|
|
|
%s
|
|
|
|
|
|
|
|
Endpoint=%s
|
|
|
|
LocalWorkingDir=%s
|
|
|
|
LocalGitDir=%s
|
|
|
|
LocalGitStorageDir=%s
|
|
|
|
LocalMediaDir=%s
|
2018-07-09 15:28:23 +00:00
|
|
|
LocalReferenceDirs=
|
2015-10-16 13:16:52 +00:00
|
|
|
TempDir=%s
|
2019-12-12 10:10:24 +00:00
|
|
|
ConcurrentTransfers=8
|
2016-07-26 14:52:15 +00:00
|
|
|
TusTransfers=false
|
2016-06-09 10:45:24 +00:00
|
|
|
BasicTransfersOnly=false
|
2016-05-10 10:39:09 +00:00
|
|
|
SkipDownloadErrors=false
|
2016-05-12 15:03:03 +00:00
|
|
|
FetchRecentAlways=false
|
|
|
|
FetchRecentRefsDays=7
|
|
|
|
FetchRecentCommitsDays=0
|
|
|
|
FetchRecentRefsIncludeRemotes=true
|
|
|
|
PruneOffsetDays=3
|
|
|
|
PruneVerifyRemoteAlways=false
|
|
|
|
PruneRemoteName=origin
|
2017-03-10 11:27:52 +00:00
|
|
|
LfsStorageDir=%s
|
2016-05-12 15:03:03 +00:00
|
|
|
AccessDownload=none
|
|
|
|
AccessUpload=none
|
2019-07-31 13:46:39 +00:00
|
|
|
DownloadTransfers=basic,lfs-standalone-file
|
|
|
|
UploadTransfers=basic,lfs-standalone-file
|
2015-10-21 09:58:18 +00:00
|
|
|
%s
|
|
|
|
%s
|
2017-03-10 11:27:52 +00:00
|
|
|
' "$(git lfs version)" "$(git version)" "$endpoint" "$localwd" "$localgit" "$localgitstore" "$localmedia" "$tempdir" "$lfsstorage" "$envVars" "$envInitConfig")
|
2018-05-21 20:51:10 +00:00
|
|
|
actual=$(git lfs env | grep -v "^GIT_EXEC_PATH=")
|
2015-10-21 09:58:18 +00:00
|
|
|
contains_same_elements "$expected" "$actual"
|
2015-05-26 17:48:24 +00:00
|
|
|
|
|
|
|
cd .git
|
2015-06-01 18:48:39 +00:00
|
|
|
expected2=$(echo "$expected" | sed -e 's/LocalWorkingDir=.*/LocalWorkingDir=/')
|
2018-05-21 20:51:10 +00:00
|
|
|
actual2=$(git lfs env | grep -v "^GIT_EXEC_PATH=")
|
2015-10-21 09:58:18 +00:00
|
|
|
contains_same_elements "$expected2" "$actual2"
|
2015-05-26 17:48:24 +00:00
|
|
|
)
|
|
|
|
end_test
|
|
|
|
|
|
|
|
begin_test "env with multiple remotes"
|
|
|
|
(
|
|
|
|
set -e
|
|
|
|
reponame="env-multiple-remotes"
|
2019-08-26 20:42:08 +00:00
|
|
|
unset_vars
|
2015-05-26 17:48:24 +00:00
|
|
|
mkdir $reponame
|
|
|
|
cd $reponame
|
|
|
|
git init
|
|
|
|
git remote add origin "$GITSERVER/env-origin-remote"
|
|
|
|
git remote add other "$GITSERVER/env-other-remote"
|
|
|
|
|
2015-10-16 14:35:47 +00:00
|
|
|
endpoint="$GITSERVER/env-origin-remote.git/info/lfs (auth=none)"
|
|
|
|
endpoint2="$GITSERVER/env-other-remote.git/info/lfs (auth=none)"
|
2019-08-30 19:19:24 +00:00
|
|
|
localwd=$(canonical_path "$TRASHDIR/$reponame")
|
|
|
|
localgit=$(canonical_path "$TRASHDIR/$reponame/.git")
|
|
|
|
localgitstore=$(canonical_path "$TRASHDIR/$reponame/.git")
|
|
|
|
lfsstorage=$(canonical_path "$TRASHDIR/$reponame/.git/lfs")
|
|
|
|
localmedia=$(canonical_path "$TRASHDIR/$reponame/.git/lfs/objects")
|
|
|
|
tempdir=$(canonical_path "$TRASHDIR/$reponame/.git/lfs/tmp")
|
2015-10-20 16:24:04 +00:00
|
|
|
envVars=$(printf "%s" "$(env | grep "^GIT")")
|
2015-10-16 14:35:47 +00:00
|
|
|
expected=$(printf '%s
|
|
|
|
%s
|
|
|
|
|
|
|
|
Endpoint=%s
|
|
|
|
Endpoint (other)=%s
|
|
|
|
LocalWorkingDir=%s
|
|
|
|
LocalGitDir=%s
|
|
|
|
LocalGitStorageDir=%s
|
|
|
|
LocalMediaDir=%s
|
2018-07-09 15:28:23 +00:00
|
|
|
LocalReferenceDirs=
|
2015-10-16 14:35:47 +00:00
|
|
|
TempDir=%s
|
2019-12-12 10:10:24 +00:00
|
|
|
ConcurrentTransfers=8
|
2016-07-26 14:52:15 +00:00
|
|
|
TusTransfers=false
|
2016-06-09 10:45:24 +00:00
|
|
|
BasicTransfersOnly=false
|
2016-05-10 10:39:09 +00:00
|
|
|
SkipDownloadErrors=false
|
2016-05-12 15:03:03 +00:00
|
|
|
FetchRecentAlways=false
|
|
|
|
FetchRecentRefsDays=7
|
|
|
|
FetchRecentCommitsDays=0
|
|
|
|
FetchRecentRefsIncludeRemotes=true
|
|
|
|
PruneOffsetDays=3
|
|
|
|
PruneVerifyRemoteAlways=false
|
|
|
|
PruneRemoteName=origin
|
2017-03-10 11:27:52 +00:00
|
|
|
LfsStorageDir=%s
|
2016-05-12 15:03:03 +00:00
|
|
|
AccessDownload=none
|
|
|
|
AccessUpload=none
|
2019-07-31 13:46:39 +00:00
|
|
|
DownloadTransfers=basic,lfs-standalone-file
|
|
|
|
UploadTransfers=basic,lfs-standalone-file
|
2015-10-21 09:58:18 +00:00
|
|
|
%s
|
|
|
|
%s
|
2017-03-10 11:27:52 +00:00
|
|
|
' "$(git lfs version)" "$(git version)" "$endpoint" "$endpoint2" "$localwd" "$localgit" "$localgitstore" "$localmedia" "$tempdir" "$lfsstorage" "$envVars" "$envInitConfig")
|
2018-05-21 20:51:10 +00:00
|
|
|
actual=$(git lfs env | grep -v "^GIT_EXEC_PATH=")
|
2015-10-21 09:58:18 +00:00
|
|
|
contains_same_elements "$expected" "$actual"
|
2015-05-26 17:48:24 +00:00
|
|
|
|
|
|
|
cd .git
|
2015-06-01 18:48:39 +00:00
|
|
|
expected2=$(echo "$expected" | sed -e 's/LocalWorkingDir=.*/LocalWorkingDir=/')
|
2018-05-21 20:51:10 +00:00
|
|
|
actual2=$(git lfs env | grep -v "^GIT_EXEC_PATH=")
|
2015-10-21 09:58:18 +00:00
|
|
|
contains_same_elements "$expected2" "$actual2"
|
2015-05-26 17:48:24 +00:00
|
|
|
)
|
|
|
|
end_test
|
|
|
|
|
|
|
|
begin_test "env with other remote"
|
|
|
|
(
|
|
|
|
set -e
|
|
|
|
reponame="env-other-remote"
|
2019-08-26 20:42:08 +00:00
|
|
|
unset_vars
|
2015-05-26 17:48:24 +00:00
|
|
|
mkdir $reponame
|
|
|
|
cd $reponame
|
|
|
|
git init
|
|
|
|
git remote add other "$GITSERVER/env-other-remote"
|
|
|
|
|
2015-10-16 15:31:40 +00:00
|
|
|
endpoint="$GITSERVER/env-other-remote.git/info/lfs (auth=none)"
|
2019-08-30 19:19:24 +00:00
|
|
|
localwd=$(canonical_path "$TRASHDIR/$reponame")
|
|
|
|
localgit=$(canonical_path "$TRASHDIR/$reponame/.git")
|
|
|
|
localgitstore=$(canonical_path "$TRASHDIR/$reponame/.git")
|
|
|
|
lfsstorage=$(canonical_path "$TRASHDIR/$reponame/.git/lfs")
|
|
|
|
localmedia=$(canonical_path "$TRASHDIR/$reponame/.git/lfs/objects")
|
|
|
|
tempdir=$(canonical_path "$TRASHDIR/$reponame/.git/lfs/tmp")
|
2015-10-20 16:24:04 +00:00
|
|
|
envVars=$(printf "%s" "$(env | grep "^GIT")")
|
2015-10-16 15:31:40 +00:00
|
|
|
|
|
|
|
expected=$(printf '%s
|
|
|
|
%s
|
|
|
|
|
|
|
|
Endpoint (other)=%s
|
|
|
|
LocalWorkingDir=%s
|
|
|
|
LocalGitDir=%s
|
|
|
|
LocalGitStorageDir=%s
|
|
|
|
LocalMediaDir=%s
|
2018-07-09 15:28:23 +00:00
|
|
|
LocalReferenceDirs=
|
2015-10-16 15:31:40 +00:00
|
|
|
TempDir=%s
|
2019-12-12 10:10:24 +00:00
|
|
|
ConcurrentTransfers=8
|
2016-07-26 14:52:15 +00:00
|
|
|
TusTransfers=false
|
2016-06-09 10:45:24 +00:00
|
|
|
BasicTransfersOnly=false
|
2016-05-10 10:39:09 +00:00
|
|
|
SkipDownloadErrors=false
|
2016-05-12 15:03:03 +00:00
|
|
|
FetchRecentAlways=false
|
|
|
|
FetchRecentRefsDays=7
|
|
|
|
FetchRecentCommitsDays=0
|
|
|
|
FetchRecentRefsIncludeRemotes=true
|
|
|
|
PruneOffsetDays=3
|
|
|
|
PruneVerifyRemoteAlways=false
|
|
|
|
PruneRemoteName=origin
|
2017-03-10 11:27:52 +00:00
|
|
|
LfsStorageDir=%s
|
2016-05-12 15:03:03 +00:00
|
|
|
AccessDownload=none
|
|
|
|
AccessUpload=none
|
2019-07-31 13:46:39 +00:00
|
|
|
DownloadTransfers=basic,lfs-standalone-file
|
|
|
|
UploadTransfers=basic,lfs-standalone-file
|
2015-10-21 09:58:18 +00:00
|
|
|
%s
|
|
|
|
%s
|
2017-03-10 11:27:52 +00:00
|
|
|
' "$(git lfs version)" "$(git version)" "$endpoint" "$localwd" "$localgit" "$localgitstore" "$localmedia" "$tempdir" "$lfsstorage" "$envVars" "$envInitConfig")
|
2018-05-21 20:51:10 +00:00
|
|
|
actual=$(git lfs env | grep -v "^GIT_EXEC_PATH=")
|
2015-10-21 09:58:18 +00:00
|
|
|
contains_same_elements "$expected" "$actual"
|
2015-05-26 17:48:24 +00:00
|
|
|
|
|
|
|
cd .git
|
2015-06-01 18:48:39 +00:00
|
|
|
expected2=$(echo "$expected" | sed -e 's/LocalWorkingDir=.*/LocalWorkingDir=/')
|
2018-05-21 20:51:10 +00:00
|
|
|
actual2=$(git lfs env | grep -v "^GIT_EXEC_PATH=")
|
2015-10-21 09:58:18 +00:00
|
|
|
contains_same_elements "$expected2" "$actual2"
|
2015-05-26 17:48:24 +00:00
|
|
|
)
|
|
|
|
end_test
|
|
|
|
|
|
|
|
begin_test "env with multiple remotes and lfs.url config"
|
|
|
|
(
|
|
|
|
set -e
|
|
|
|
reponame="env-multiple-remotes-with-lfs-url"
|
2019-08-26 20:42:08 +00:00
|
|
|
unset_vars
|
2015-05-26 17:48:24 +00:00
|
|
|
mkdir $reponame
|
|
|
|
cd $reponame
|
|
|
|
git init
|
|
|
|
git remote add origin "$GITSERVER/env-origin-remote"
|
|
|
|
git remote add other "$GITSERVER/env-other-remote"
|
|
|
|
git config lfs.url "http://foo/bar"
|
|
|
|
|
2019-08-30 19:19:24 +00:00
|
|
|
localwd=$(canonical_path "$TRASHDIR/$reponame")
|
|
|
|
localgit=$(canonical_path "$TRASHDIR/$reponame/.git")
|
|
|
|
localgitstore=$(canonical_path "$TRASHDIR/$reponame/.git")
|
|
|
|
lfsstorage=$(canonical_path "$TRASHDIR/$reponame/.git/lfs")
|
|
|
|
localmedia=$(canonical_path "$TRASHDIR/$reponame/.git/lfs/objects")
|
|
|
|
tempdir=$(canonical_path "$TRASHDIR/$reponame/.git/lfs/tmp")
|
2015-10-20 16:24:04 +00:00
|
|
|
envVars=$(printf "%s" "$(env | grep "^GIT")")
|
2015-10-16 15:31:40 +00:00
|
|
|
expected=$(printf '%s
|
|
|
|
%s
|
|
|
|
|
2015-09-01 21:54:31 +00:00
|
|
|
Endpoint=http://foo/bar (auth=none)
|
command/env: ensure we honor lfs.url
When we attempt to look up an endpoint to push to or pull from a remote,
we call the endpoint finder's Endpoint method, which honors lfs.url, not
the RemoteEndpoint method, which does not. However, when enumerating
remotes in git lfs env, we call RemoteEndpoint, which means we produce
the wrong endpoint if the lfs.url option is set.
Update the code to call the correct method, so that we get the correct
results. Since the tests check for this case and print the old
information (which doesn't match what we actually do), update them as
well. Now that we have several tests that produce similar output because
they all use lfs.url, update one of the tests to test more useful cases
by removing the use of lfs.url.
2019-01-11 17:22:51 +00:00
|
|
|
Endpoint (other)=http://foo/bar (auth=none)
|
2015-10-16 15:31:40 +00:00
|
|
|
LocalWorkingDir=%s
|
|
|
|
LocalGitDir=%s
|
|
|
|
LocalGitStorageDir=%s
|
|
|
|
LocalMediaDir=%s
|
2018-07-09 15:28:23 +00:00
|
|
|
LocalReferenceDirs=
|
2015-10-16 15:31:40 +00:00
|
|
|
TempDir=%s
|
2019-12-12 10:10:24 +00:00
|
|
|
ConcurrentTransfers=8
|
2016-07-26 14:52:15 +00:00
|
|
|
TusTransfers=false
|
2016-06-09 10:45:24 +00:00
|
|
|
BasicTransfersOnly=false
|
2016-05-10 10:39:09 +00:00
|
|
|
SkipDownloadErrors=false
|
2016-05-12 15:03:03 +00:00
|
|
|
FetchRecentAlways=false
|
|
|
|
FetchRecentRefsDays=7
|
|
|
|
FetchRecentCommitsDays=0
|
|
|
|
FetchRecentRefsIncludeRemotes=true
|
|
|
|
PruneOffsetDays=3
|
|
|
|
PruneVerifyRemoteAlways=false
|
|
|
|
PruneRemoteName=origin
|
2017-03-10 11:27:52 +00:00
|
|
|
LfsStorageDir=%s
|
2016-05-12 15:03:03 +00:00
|
|
|
AccessDownload=none
|
|
|
|
AccessUpload=none
|
2019-07-31 13:46:39 +00:00
|
|
|
DownloadTransfers=basic,lfs-standalone-file
|
|
|
|
UploadTransfers=basic,lfs-standalone-file
|
2015-10-21 09:58:18 +00:00
|
|
|
%s
|
|
|
|
%s
|
command/env: ensure we honor lfs.url
When we attempt to look up an endpoint to push to or pull from a remote,
we call the endpoint finder's Endpoint method, which honors lfs.url, not
the RemoteEndpoint method, which does not. However, when enumerating
remotes in git lfs env, we call RemoteEndpoint, which means we produce
the wrong endpoint if the lfs.url option is set.
Update the code to call the correct method, so that we get the correct
results. Since the tests check for this case and print the old
information (which doesn't match what we actually do), update them as
well. Now that we have several tests that produce similar output because
they all use lfs.url, update one of the tests to test more useful cases
by removing the use of lfs.url.
2019-01-11 17:22:51 +00:00
|
|
|
' "$(git lfs version)" "$(git version)" "$localwd" "$localgit" "$localgitstore" "$localmedia" "$tempdir" "$lfsstorage" "$envVars" "$envInitConfig")
|
2018-05-21 20:51:10 +00:00
|
|
|
actual=$(git lfs env | grep -v "^GIT_EXEC_PATH=")
|
2015-10-21 09:58:18 +00:00
|
|
|
contains_same_elements "$expected" "$actual"
|
2015-05-26 17:48:24 +00:00
|
|
|
|
|
|
|
cd .git
|
2015-06-01 18:48:39 +00:00
|
|
|
expected2=$(echo "$expected" | sed -e 's/LocalWorkingDir=.*/LocalWorkingDir=/')
|
2018-05-21 20:51:10 +00:00
|
|
|
actual2=$(git lfs env | grep -v "^GIT_EXEC_PATH=")
|
2015-10-21 09:58:18 +00:00
|
|
|
contains_same_elements "$expected2" "$actual2"
|
2015-05-26 17:48:24 +00:00
|
|
|
)
|
|
|
|
end_test
|
|
|
|
|
|
|
|
begin_test "env with multiple remotes and lfs configs"
|
|
|
|
(
|
|
|
|
set -e
|
|
|
|
reponame="env-multiple-remotes-lfs-configs"
|
2019-08-26 20:42:08 +00:00
|
|
|
unset_vars
|
2015-05-26 17:48:24 +00:00
|
|
|
mkdir $reponame
|
|
|
|
cd $reponame
|
|
|
|
git init
|
|
|
|
git remote add origin "$GITSERVER/env-origin-remote"
|
|
|
|
git remote add other "$GITSERVER/env-other-remote"
|
|
|
|
git config lfs.url "http://foo/bar"
|
|
|
|
git config remote.origin.lfsurl "http://custom/origin"
|
|
|
|
git config remote.other.lfsurl "http://custom/other"
|
|
|
|
|
2019-08-30 19:19:24 +00:00
|
|
|
localwd=$(canonical_path "$TRASHDIR/$reponame")
|
|
|
|
localgit=$(canonical_path "$TRASHDIR/$reponame/.git")
|
|
|
|
localgitstore=$(canonical_path "$TRASHDIR/$reponame/.git")
|
|
|
|
lfsstorage=$(canonical_path "$TRASHDIR/$reponame/.git/lfs")
|
|
|
|
localmedia=$(canonical_path "$TRASHDIR/$reponame/.git/lfs/objects")
|
|
|
|
tempdir=$(canonical_path "$TRASHDIR/$reponame/.git/lfs/tmp")
|
2015-10-20 16:24:04 +00:00
|
|
|
envVars=$(printf "%s" "$(env | grep "^GIT")")
|
2015-10-16 15:31:40 +00:00
|
|
|
expected=$(printf '%s
|
|
|
|
%s
|
|
|
|
|
2015-09-01 21:54:31 +00:00
|
|
|
Endpoint=http://foo/bar (auth=none)
|
command/env: ensure we honor lfs.url
When we attempt to look up an endpoint to push to or pull from a remote,
we call the endpoint finder's Endpoint method, which honors lfs.url, not
the RemoteEndpoint method, which does not. However, when enumerating
remotes in git lfs env, we call RemoteEndpoint, which means we produce
the wrong endpoint if the lfs.url option is set.
Update the code to call the correct method, so that we get the correct
results. Since the tests check for this case and print the old
information (which doesn't match what we actually do), update them as
well. Now that we have several tests that produce similar output because
they all use lfs.url, update one of the tests to test more useful cases
by removing the use of lfs.url.
2019-01-11 17:22:51 +00:00
|
|
|
Endpoint (other)=http://foo/bar (auth=none)
|
2015-10-16 15:31:40 +00:00
|
|
|
LocalWorkingDir=%s
|
|
|
|
LocalGitDir=%s
|
|
|
|
LocalGitStorageDir=%s
|
|
|
|
LocalMediaDir=%s
|
2018-07-09 15:28:23 +00:00
|
|
|
LocalReferenceDirs=
|
2015-10-16 15:31:40 +00:00
|
|
|
TempDir=%s
|
2019-12-12 10:10:24 +00:00
|
|
|
ConcurrentTransfers=8
|
2016-07-26 14:52:15 +00:00
|
|
|
TusTransfers=false
|
2016-06-09 10:45:24 +00:00
|
|
|
BasicTransfersOnly=false
|
2016-05-10 10:39:09 +00:00
|
|
|
SkipDownloadErrors=false
|
2016-05-12 15:03:03 +00:00
|
|
|
FetchRecentAlways=false
|
|
|
|
FetchRecentRefsDays=7
|
|
|
|
FetchRecentCommitsDays=0
|
|
|
|
FetchRecentRefsIncludeRemotes=true
|
|
|
|
PruneOffsetDays=3
|
|
|
|
PruneVerifyRemoteAlways=false
|
|
|
|
PruneRemoteName=origin
|
2017-03-10 11:27:52 +00:00
|
|
|
LfsStorageDir=%s
|
2016-05-12 15:03:03 +00:00
|
|
|
AccessDownload=none
|
|
|
|
AccessUpload=none
|
2019-07-31 13:46:39 +00:00
|
|
|
DownloadTransfers=basic,lfs-standalone-file
|
|
|
|
UploadTransfers=basic,lfs-standalone-file
|
2015-10-21 09:58:18 +00:00
|
|
|
%s
|
|
|
|
%s
|
2017-03-10 11:27:52 +00:00
|
|
|
' "$(git lfs version)" "$(git version)" "$localwd" "$localgit" "$localgitstore" "$localmedia" "$tempdir" "$lfsstorage" "$envVars" "$envInitConfig")
|
2018-05-21 20:51:10 +00:00
|
|
|
actual=$(git lfs env | grep -v "^GIT_EXEC_PATH=")
|
2015-10-21 09:58:18 +00:00
|
|
|
contains_same_elements "$expected" "$actual"
|
2015-05-27 20:09:58 +00:00
|
|
|
|
|
|
|
cd .git
|
2015-06-01 18:48:39 +00:00
|
|
|
expected2=$(echo "$expected" | sed -e 's/LocalWorkingDir=.*/LocalWorkingDir=/')
|
2018-05-21 20:51:10 +00:00
|
|
|
actual2=$(git lfs env | grep -v "^GIT_EXEC_PATH=")
|
2015-10-21 10:47:11 +00:00
|
|
|
contains_same_elements "$expected2" "$actual2"
|
2015-05-27 20:09:58 +00:00
|
|
|
)
|
|
|
|
end_test
|
|
|
|
|
command/env: ensure we honor lfs.url
When we attempt to look up an endpoint to push to or pull from a remote,
we call the endpoint finder's Endpoint method, which honors lfs.url, not
the RemoteEndpoint method, which does not. However, when enumerating
remotes in git lfs env, we call RemoteEndpoint, which means we produce
the wrong endpoint if the lfs.url option is set.
Update the code to call the correct method, so that we get the correct
results. Since the tests check for this case and print the old
information (which doesn't match what we actually do), update them as
well. Now that we have several tests that produce similar output because
they all use lfs.url, update one of the tests to test more useful cases
by removing the use of lfs.url.
2019-01-11 17:22:51 +00:00
|
|
|
begin_test "env with multiple remotes and batch configs"
|
2015-05-27 20:09:58 +00:00
|
|
|
(
|
|
|
|
set -e
|
|
|
|
reponame="env-multiple-remotes-lfs-batch-configs"
|
2019-08-26 20:42:08 +00:00
|
|
|
unset_vars
|
2015-05-27 20:09:58 +00:00
|
|
|
mkdir $reponame
|
|
|
|
cd $reponame
|
|
|
|
git init
|
|
|
|
git remote add origin "$GITSERVER/env-origin-remote"
|
|
|
|
git remote add other "$GITSERVER/env-other-remote"
|
|
|
|
git config lfs.concurrenttransfers 5
|
command/env: ensure we honor lfs.url
When we attempt to look up an endpoint to push to or pull from a remote,
we call the endpoint finder's Endpoint method, which honors lfs.url, not
the RemoteEndpoint method, which does not. However, when enumerating
remotes in git lfs env, we call RemoteEndpoint, which means we produce
the wrong endpoint if the lfs.url option is set.
Update the code to call the correct method, so that we get the correct
results. Since the tests check for this case and print the old
information (which doesn't match what we actually do), update them as
well. Now that we have several tests that produce similar output because
they all use lfs.url, update one of the tests to test more useful cases
by removing the use of lfs.url.
2019-01-11 17:22:51 +00:00
|
|
|
git config remote.origin.lfsurl "http://foo/bar"
|
2015-05-27 20:09:58 +00:00
|
|
|
git config remote.other.lfsurl "http://custom/other"
|
|
|
|
|
2019-08-30 19:19:24 +00:00
|
|
|
localwd=$(canonical_path "$TRASHDIR/$reponame")
|
|
|
|
localgit=$(canonical_path "$TRASHDIR/$reponame/.git")
|
|
|
|
localgitstore=$(canonical_path "$TRASHDIR/$reponame/.git")
|
|
|
|
lfsstorage=$(canonical_path "$TRASHDIR/$reponame/.git/lfs")
|
|
|
|
localmedia=$(canonical_path "$TRASHDIR/$reponame/.git/lfs/objects")
|
|
|
|
tempdir=$(canonical_path "$TRASHDIR/$reponame/.git/lfs/tmp")
|
2015-10-20 16:24:04 +00:00
|
|
|
envVars=$(printf "%s" "$(env | grep "^GIT")")
|
2015-10-16 15:31:40 +00:00
|
|
|
expected=$(printf '%s
|
|
|
|
%s
|
|
|
|
|
2015-09-01 21:54:31 +00:00
|
|
|
Endpoint=http://foo/bar (auth=none)
|
|
|
|
Endpoint (other)=http://custom/other (auth=none)
|
2015-10-16 15:31:40 +00:00
|
|
|
LocalWorkingDir=%s
|
|
|
|
LocalGitDir=%s
|
|
|
|
LocalGitStorageDir=%s
|
|
|
|
LocalMediaDir=%s
|
2018-07-09 15:28:23 +00:00
|
|
|
LocalReferenceDirs=
|
2015-10-16 15:31:40 +00:00
|
|
|
TempDir=%s
|
2015-05-27 20:09:58 +00:00
|
|
|
ConcurrentTransfers=5
|
2016-07-26 14:52:15 +00:00
|
|
|
TusTransfers=false
|
2016-06-09 10:45:24 +00:00
|
|
|
BasicTransfersOnly=false
|
2016-05-10 10:39:09 +00:00
|
|
|
SkipDownloadErrors=false
|
2016-05-12 15:03:03 +00:00
|
|
|
FetchRecentAlways=false
|
|
|
|
FetchRecentRefsDays=7
|
|
|
|
FetchRecentCommitsDays=0
|
|
|
|
FetchRecentRefsIncludeRemotes=true
|
|
|
|
PruneOffsetDays=3
|
|
|
|
PruneVerifyRemoteAlways=false
|
|
|
|
PruneRemoteName=origin
|
2017-03-10 11:27:52 +00:00
|
|
|
LfsStorageDir=%s
|
2016-05-12 15:03:03 +00:00
|
|
|
AccessDownload=none
|
|
|
|
AccessUpload=none
|
2019-07-31 13:46:39 +00:00
|
|
|
DownloadTransfers=basic,lfs-standalone-file
|
|
|
|
UploadTransfers=basic,lfs-standalone-file
|
2015-10-21 09:58:18 +00:00
|
|
|
%s
|
|
|
|
%s
|
2017-03-10 11:27:52 +00:00
|
|
|
' "$(git lfs version)" "$(git version)" "$localwd" "$localgit" "$localgitstore" "$localmedia" "$tempdir" "$lfsstorage" "$envVars" "$envInitConfig")
|
2018-05-21 20:51:10 +00:00
|
|
|
actual=$(git lfs env | grep -v "^GIT_EXEC_PATH=")
|
2015-10-21 09:58:18 +00:00
|
|
|
contains_same_elements "$expected" "$actual"
|
2015-05-26 17:48:24 +00:00
|
|
|
|
|
|
|
cd .git
|
2015-06-01 18:49:28 +00:00
|
|
|
expected2=$(echo "$expected" | sed -e 's/LocalWorkingDir=.*/LocalWorkingDir=/')
|
2018-05-21 20:51:10 +00:00
|
|
|
actual2=$(git lfs env | grep -v "^GIT_EXEC_PATH=")
|
2015-10-21 09:58:18 +00:00
|
|
|
contains_same_elements "$expected2" "$actual2"
|
2015-06-01 18:49:28 +00:00
|
|
|
)
|
|
|
|
end_test
|
|
|
|
|
2015-11-16 19:53:01 +00:00
|
|
|
begin_test "env with .lfsconfig"
|
|
|
|
(
|
|
|
|
set -e
|
|
|
|
reponame="env-with-lfsconfig"
|
2019-08-26 20:42:08 +00:00
|
|
|
unset_vars
|
2015-11-16 19:53:01 +00:00
|
|
|
|
|
|
|
git init $reponame
|
|
|
|
cd $reponame
|
|
|
|
|
|
|
|
git remote add origin "$GITSERVER/env-origin-remote"
|
|
|
|
echo '[remote "origin"]
|
|
|
|
lfsurl = http://foobar:8080/
|
|
|
|
[lfs]
|
|
|
|
batch = false
|
|
|
|
concurrenttransfers = 5
|
|
|
|
' > .lfsconfig
|
|
|
|
echo '[remote "origin"]
|
|
|
|
lfsurl = http://foobar:5050/
|
|
|
|
[lfs]
|
|
|
|
batch = true
|
|
|
|
concurrenttransfers = 50
|
|
|
|
' > .gitconfig
|
|
|
|
|
2019-08-30 19:19:24 +00:00
|
|
|
localwd=$(canonical_path "$TRASHDIR/$reponame")
|
|
|
|
localgit=$(canonical_path "$TRASHDIR/$reponame/.git")
|
|
|
|
localgitstore=$(canonical_path "$TRASHDIR/$reponame/.git")
|
|
|
|
lfsstorage=$(canonical_path "$TRASHDIR/$reponame/.git/lfs")
|
|
|
|
localmedia=$(canonical_path "$TRASHDIR/$reponame/.git/lfs/objects")
|
|
|
|
tempdir=$(canonical_path "$TRASHDIR/$reponame/.git/lfs/tmp")
|
2015-11-16 19:53:01 +00:00
|
|
|
envVars=$(printf "%s" "$(env | grep "^GIT")")
|
|
|
|
expected=$(printf '%s
|
|
|
|
%s
|
|
|
|
|
2015-09-01 21:54:31 +00:00
|
|
|
Endpoint=http://foobar:8080/ (auth=none)
|
2015-10-16 15:31:40 +00:00
|
|
|
LocalWorkingDir=%s
|
|
|
|
LocalGitDir=%s
|
|
|
|
LocalGitStorageDir=%s
|
|
|
|
LocalMediaDir=%s
|
2018-07-09 15:28:23 +00:00
|
|
|
LocalReferenceDirs=
|
2015-10-16 15:31:40 +00:00
|
|
|
TempDir=%s
|
2019-12-12 10:10:24 +00:00
|
|
|
ConcurrentTransfers=8
|
2016-07-26 14:52:15 +00:00
|
|
|
TusTransfers=false
|
2016-06-09 10:45:24 +00:00
|
|
|
BasicTransfersOnly=false
|
2016-05-10 10:39:09 +00:00
|
|
|
SkipDownloadErrors=false
|
2016-05-12 15:03:03 +00:00
|
|
|
FetchRecentAlways=false
|
|
|
|
FetchRecentRefsDays=7
|
|
|
|
FetchRecentCommitsDays=0
|
|
|
|
FetchRecentRefsIncludeRemotes=true
|
|
|
|
PruneOffsetDays=3
|
|
|
|
PruneVerifyRemoteAlways=false
|
|
|
|
PruneRemoteName=origin
|
2017-03-10 11:27:52 +00:00
|
|
|
LfsStorageDir=%s
|
2016-05-12 15:03:03 +00:00
|
|
|
AccessDownload=none
|
|
|
|
AccessUpload=none
|
2019-07-31 13:46:39 +00:00
|
|
|
DownloadTransfers=basic,lfs-standalone-file
|
|
|
|
UploadTransfers=basic,lfs-standalone-file
|
2015-10-21 09:58:18 +00:00
|
|
|
%s
|
|
|
|
%s
|
2017-03-10 11:27:52 +00:00
|
|
|
' "$(git lfs version)" "$(git version)" "$localwd" "$localgit" "$localgitstore" "$localmedia" "$tempdir" "$lfsstorage" "$envVars" "$envInitConfig")
|
2018-05-21 20:51:10 +00:00
|
|
|
actual=$(git lfs env | grep -v "^GIT_EXEC_PATH=")
|
2015-10-21 09:58:18 +00:00
|
|
|
contains_same_elements "$expected" "$actual"
|
2015-06-01 18:49:28 +00:00
|
|
|
|
|
|
|
mkdir a
|
|
|
|
cd a
|
2018-05-21 20:51:10 +00:00
|
|
|
actual2=$(git lfs env | grep -v "^GIT_EXEC_PATH=")
|
2015-10-21 09:58:18 +00:00
|
|
|
contains_same_elements "$expected" "$actual2"
|
2015-05-26 17:48:24 +00:00
|
|
|
)
|
|
|
|
end_test
|
2015-06-06 12:30:54 +00:00
|
|
|
|
|
|
|
begin_test "env with environment variables"
|
|
|
|
(
|
|
|
|
set -e
|
|
|
|
reponame="env-with-envvars"
|
2019-08-26 20:42:08 +00:00
|
|
|
unset_vars
|
2015-06-06 12:30:54 +00:00
|
|
|
git init $reponame
|
|
|
|
mkdir -p $reponame/a/b/c
|
|
|
|
|
2019-08-30 19:19:24 +00:00
|
|
|
gitDir=$(canonical_path "$TRASHDIR/$reponame/.git")
|
|
|
|
workTree=$(canonical_path "$TRASHDIR/$reponame/a/b")
|
2015-06-06 12:30:54 +00:00
|
|
|
|
2019-08-30 19:19:24 +00:00
|
|
|
localwd=$(canonical_path "$TRASHDIR/$reponame/a/b")
|
|
|
|
localgit=$(canonical_path "$TRASHDIR/$reponame/.git")
|
|
|
|
localgitstore=$(canonical_path "$TRASHDIR/$reponame/.git")
|
|
|
|
lfsstorage=$(canonical_path "$TRASHDIR/$reponame/.git/lfs")
|
|
|
|
localmedia=$(canonical_path "$TRASHDIR/$reponame/.git/lfs/objects")
|
|
|
|
tempdir=$(canonical_path "$TRASHDIR/$reponame/.git/lfs/tmp")
|
2015-10-20 16:24:04 +00:00
|
|
|
envVars="$(GIT_DIR=$gitDir GIT_WORK_TREE=$workTree env | grep "^GIT" | sort)"
|
2015-10-16 15:31:40 +00:00
|
|
|
expected=$(printf '%s
|
|
|
|
%s
|
|
|
|
|
|
|
|
LocalWorkingDir=%s
|
|
|
|
LocalGitDir=%s
|
|
|
|
LocalGitStorageDir=%s
|
|
|
|
LocalMediaDir=%s
|
2018-07-09 15:28:23 +00:00
|
|
|
LocalReferenceDirs=
|
2015-10-16 15:31:40 +00:00
|
|
|
TempDir=%s
|
2019-12-12 10:10:24 +00:00
|
|
|
ConcurrentTransfers=8
|
2016-07-26 14:52:15 +00:00
|
|
|
TusTransfers=false
|
2016-06-09 10:45:24 +00:00
|
|
|
BasicTransfersOnly=false
|
2016-05-10 10:39:09 +00:00
|
|
|
SkipDownloadErrors=false
|
2016-05-12 15:03:03 +00:00
|
|
|
FetchRecentAlways=false
|
|
|
|
FetchRecentRefsDays=7
|
|
|
|
FetchRecentCommitsDays=0
|
|
|
|
FetchRecentRefsIncludeRemotes=true
|
|
|
|
PruneOffsetDays=3
|
|
|
|
PruneVerifyRemoteAlways=false
|
|
|
|
PruneRemoteName=origin
|
2017-03-10 11:27:52 +00:00
|
|
|
LfsStorageDir=%s
|
2016-05-12 15:03:03 +00:00
|
|
|
AccessDownload=none
|
|
|
|
AccessUpload=none
|
2019-07-31 13:46:39 +00:00
|
|
|
DownloadTransfers=basic,lfs-standalone-file
|
|
|
|
UploadTransfers=basic,lfs-standalone-file
|
2015-09-23 20:02:22 +00:00
|
|
|
%s
|
2015-10-16 15:31:40 +00:00
|
|
|
%s
|
2017-03-10 11:27:52 +00:00
|
|
|
' "$(git lfs version)" "$(git version)" "$localwd" "$localgit" "$localgitstore" "$localmedia" "$tempdir" "$lfsstorage" "$envVars" "$envInitConfig")
|
2015-06-06 12:30:54 +00:00
|
|
|
|
2018-05-21 20:51:10 +00:00
|
|
|
actual=$(GIT_DIR=$gitDir GIT_WORK_TREE=$workTree git lfs env \
|
|
|
|
| grep -v "^GIT_EXEC_PATH=")
|
2015-10-21 09:58:18 +00:00
|
|
|
contains_same_elements "$expected" "$actual"
|
2015-06-06 12:30:54 +00:00
|
|
|
|
|
|
|
cd $TRASHDIR/$reponame
|
2018-05-21 20:51:10 +00:00
|
|
|
actual2=$(GIT_DIR=$gitDir GIT_WORK_TREE=$workTree git lfs env \
|
|
|
|
| grep -v "^GIT_EXEC_PATH=")
|
2015-10-21 09:58:18 +00:00
|
|
|
contains_same_elements "$expected" "$actual2"
|
2015-06-06 12:30:54 +00:00
|
|
|
|
|
|
|
cd $TRASHDIR/$reponame/.git
|
2018-05-21 20:51:10 +00:00
|
|
|
actual3=$(GIT_DIR=$gitDir GIT_WORK_TREE=$workTree git lfs env \
|
|
|
|
| grep -v "^GIT_EXEC_PATH=")
|
2015-10-21 09:58:18 +00:00
|
|
|
contains_same_elements "$expected" "$actual3"
|
2015-06-06 12:30:54 +00:00
|
|
|
|
|
|
|
cd $TRASHDIR/$reponame/a/b/c
|
2018-05-21 20:51:10 +00:00
|
|
|
actual4=$(GIT_DIR=$gitDir GIT_WORK_TREE=$workTree git lfs env \
|
|
|
|
| grep -v "^GIT_EXEC_PATH=")
|
2015-10-21 09:58:18 +00:00
|
|
|
contains_same_elements "$expected" "$actual4"
|
2015-06-06 12:30:54 +00:00
|
|
|
|
2015-10-20 16:24:04 +00:00
|
|
|
envVars="$(GIT_DIR=$gitDir GIT_WORK_TREE=a/b env | grep "^GIT" | sort)"
|
2018-07-25 21:29:50 +00:00
|
|
|
|
|
|
|
# `a/b` is an invalid relative path from where we are now and results in an
|
|
|
|
# error, so resulting output will have many fields blank or invalid
|
|
|
|
mediaDir5=$(native_path "lfs/objects")
|
|
|
|
tempDir5=$(native_path "lfs/tmp")
|
2015-10-16 15:31:40 +00:00
|
|
|
expected5=$(printf '%s
|
|
|
|
%s
|
|
|
|
|
2018-07-25 21:29:50 +00:00
|
|
|
LocalWorkingDir=
|
|
|
|
LocalGitDir=
|
|
|
|
LocalGitStorageDir=
|
2015-10-16 15:31:40 +00:00
|
|
|
LocalMediaDir=%s
|
2018-07-09 15:28:23 +00:00
|
|
|
LocalReferenceDirs=
|
2015-10-16 15:31:40 +00:00
|
|
|
TempDir=%s
|
2019-12-12 10:10:24 +00:00
|
|
|
ConcurrentTransfers=8
|
2016-07-26 14:52:15 +00:00
|
|
|
TusTransfers=false
|
2016-06-09 10:45:24 +00:00
|
|
|
BasicTransfersOnly=false
|
2016-05-12 15:03:03 +00:00
|
|
|
SkipDownloadErrors=false
|
|
|
|
FetchRecentAlways=false
|
|
|
|
FetchRecentRefsDays=7
|
|
|
|
FetchRecentCommitsDays=0
|
|
|
|
FetchRecentRefsIncludeRemotes=true
|
|
|
|
PruneOffsetDays=3
|
|
|
|
PruneVerifyRemoteAlways=false
|
|
|
|
PruneRemoteName=origin
|
2018-07-25 21:29:50 +00:00
|
|
|
LfsStorageDir=lfs
|
2016-05-12 15:03:03 +00:00
|
|
|
AccessDownload=none
|
|
|
|
AccessUpload=none
|
2019-07-31 13:46:39 +00:00
|
|
|
DownloadTransfers=basic,lfs-standalone-file
|
|
|
|
UploadTransfers=basic,lfs-standalone-file
|
2015-10-16 15:31:40 +00:00
|
|
|
%s
|
2018-07-25 21:29:50 +00:00
|
|
|
git config filter.lfs.process = ""
|
|
|
|
git config filter.lfs.smudge = ""
|
|
|
|
git config filter.lfs.clean = ""
|
|
|
|
' "$(git lfs version)" "$(git version)" "$mediaDir5" "$tempDir5" "$envVars")
|
2018-05-21 20:51:10 +00:00
|
|
|
actual5=$(GIT_DIR=$gitDir GIT_WORK_TREE=a/b git lfs env \
|
|
|
|
| grep -v "^GIT_EXEC_PATH=")
|
2015-10-21 09:58:18 +00:00
|
|
|
contains_same_elements "$expected5" "$actual5"
|
2015-06-06 12:30:54 +00:00
|
|
|
|
|
|
|
cd $TRASHDIR/$reponame/a/b
|
2015-10-20 16:24:04 +00:00
|
|
|
envVars="$(GIT_DIR=$gitDir env | grep "^GIT" | sort)"
|
2015-10-16 15:31:40 +00:00
|
|
|
expected7=$(printf '%s
|
|
|
|
%s
|
|
|
|
|
|
|
|
LocalWorkingDir=%s
|
|
|
|
LocalGitDir=%s
|
|
|
|
LocalGitStorageDir=%s
|
|
|
|
LocalMediaDir=%s
|
2018-07-09 15:28:23 +00:00
|
|
|
LocalReferenceDirs=
|
2015-10-16 15:31:40 +00:00
|
|
|
TempDir=%s
|
2019-12-12 10:10:24 +00:00
|
|
|
ConcurrentTransfers=8
|
2016-07-26 14:52:15 +00:00
|
|
|
TusTransfers=false
|
2016-06-09 10:45:24 +00:00
|
|
|
BasicTransfersOnly=false
|
2016-05-10 10:39:09 +00:00
|
|
|
SkipDownloadErrors=false
|
2016-05-12 15:03:03 +00:00
|
|
|
FetchRecentAlways=false
|
|
|
|
FetchRecentRefsDays=7
|
|
|
|
FetchRecentCommitsDays=0
|
|
|
|
FetchRecentRefsIncludeRemotes=true
|
|
|
|
PruneOffsetDays=3
|
|
|
|
PruneVerifyRemoteAlways=false
|
|
|
|
PruneRemoteName=origin
|
2017-03-10 11:27:52 +00:00
|
|
|
LfsStorageDir=%s
|
2016-05-12 15:03:03 +00:00
|
|
|
AccessDownload=none
|
|
|
|
AccessUpload=none
|
2019-07-31 13:46:39 +00:00
|
|
|
DownloadTransfers=basic,lfs-standalone-file
|
|
|
|
UploadTransfers=basic,lfs-standalone-file
|
2015-09-23 20:02:22 +00:00
|
|
|
%s
|
2015-10-16 15:31:40 +00:00
|
|
|
%s
|
2017-03-10 11:27:52 +00:00
|
|
|
' "$(git lfs version)" "$(git version)" "$localwd" "$localgit" "$localgitstore" "$localmedia" "$tempdir" "$lfsstorage" "$envVars" "$envInitConfig")
|
2018-05-21 20:51:10 +00:00
|
|
|
actual7=$(GIT_DIR=$gitDir git lfs env | grep -v "^GIT_EXEC_PATH=")
|
2015-10-21 09:58:18 +00:00
|
|
|
contains_same_elements "$expected7" "$actual7"
|
2015-06-06 12:30:54 +00:00
|
|
|
|
|
|
|
cd $TRASHDIR/$reponame/a
|
2015-10-20 16:24:04 +00:00
|
|
|
envVars="$(GIT_WORK_TREE=$workTree env | grep "^GIT" | sort)"
|
2015-10-16 15:31:40 +00:00
|
|
|
expected8=$(printf '%s
|
|
|
|
%s
|
|
|
|
|
|
|
|
LocalWorkingDir=%s
|
|
|
|
LocalGitDir=%s
|
|
|
|
LocalGitStorageDir=%s
|
|
|
|
LocalMediaDir=%s
|
2018-07-09 15:28:23 +00:00
|
|
|
LocalReferenceDirs=
|
2015-10-16 15:31:40 +00:00
|
|
|
TempDir=%s
|
2019-12-12 10:10:24 +00:00
|
|
|
ConcurrentTransfers=8
|
2016-07-26 14:52:15 +00:00
|
|
|
TusTransfers=false
|
2016-06-09 10:45:24 +00:00
|
|
|
BasicTransfersOnly=false
|
2016-05-10 10:39:09 +00:00
|
|
|
SkipDownloadErrors=false
|
2016-05-12 15:03:03 +00:00
|
|
|
FetchRecentAlways=false
|
|
|
|
FetchRecentRefsDays=7
|
|
|
|
FetchRecentCommitsDays=0
|
|
|
|
FetchRecentRefsIncludeRemotes=true
|
|
|
|
PruneOffsetDays=3
|
|
|
|
PruneVerifyRemoteAlways=false
|
|
|
|
PruneRemoteName=origin
|
2017-03-10 11:27:52 +00:00
|
|
|
LfsStorageDir=%s
|
2016-05-12 15:03:03 +00:00
|
|
|
AccessDownload=none
|
|
|
|
AccessUpload=none
|
2019-07-31 13:46:39 +00:00
|
|
|
DownloadTransfers=basic,lfs-standalone-file
|
|
|
|
UploadTransfers=basic,lfs-standalone-file
|
2015-09-23 20:02:22 +00:00
|
|
|
%s
|
2015-10-16 15:31:40 +00:00
|
|
|
%s
|
2017-03-10 11:27:52 +00:00
|
|
|
' "$(git lfs version)" "$(git version)" "$localwd" "$localgit" "$localgitstore" "$localmedia" "$tempdir" "$lfsstorage" "$envVars" "$envInitConfig")
|
2018-05-21 20:51:10 +00:00
|
|
|
actual8=$(GIT_WORK_TREE=$workTree git lfs env | grep -v "^GIT_EXEC_PATH=")
|
2015-10-21 09:58:18 +00:00
|
|
|
contains_same_elements "$expected8" "$actual8"
|
2015-06-06 12:30:54 +00:00
|
|
|
)
|
|
|
|
end_test
|
2015-09-30 22:16:14 +00:00
|
|
|
|
|
|
|
begin_test "env with bare repo"
|
|
|
|
(
|
|
|
|
set -e
|
|
|
|
reponame="env-with-bare-repo"
|
2019-08-26 20:42:08 +00:00
|
|
|
unset_vars
|
2015-09-30 22:16:14 +00:00
|
|
|
git init --bare $reponame
|
|
|
|
cd $reponame
|
|
|
|
|
2019-08-30 19:19:24 +00:00
|
|
|
localgit=$(canonical_path "$TRASHDIR/$reponame")
|
|
|
|
localgitstore=$(canonical_path "$TRASHDIR/$reponame")
|
|
|
|
lfsstorage=$(canonical_path "$TRASHDIR/$reponame/lfs")
|
|
|
|
localmedia=$(canonical_path "$TRASHDIR/$reponame/lfs/objects")
|
|
|
|
tempdir=$(canonical_path "$TRASHDIR/$reponame/lfs/tmp")
|
2015-10-21 11:49:10 +00:00
|
|
|
envVars=$(printf "%s" "$(env | grep "^GIT")")
|
2015-10-16 15:31:40 +00:00
|
|
|
|
2015-09-30 22:16:14 +00:00
|
|
|
expected=$(printf "%s\n%s\n
|
|
|
|
LocalWorkingDir=
|
2015-10-16 15:31:40 +00:00
|
|
|
LocalGitDir=%s
|
|
|
|
LocalGitStorageDir=%s
|
|
|
|
LocalMediaDir=%s
|
2018-07-09 15:28:23 +00:00
|
|
|
LocalReferenceDirs=
|
2015-10-16 15:31:40 +00:00
|
|
|
TempDir=%s
|
2019-12-12 10:10:24 +00:00
|
|
|
ConcurrentTransfers=8
|
2016-07-26 14:52:15 +00:00
|
|
|
TusTransfers=false
|
2016-06-09 10:45:24 +00:00
|
|
|
BasicTransfersOnly=false
|
2016-05-10 10:39:09 +00:00
|
|
|
SkipDownloadErrors=false
|
2016-05-12 15:03:03 +00:00
|
|
|
FetchRecentAlways=false
|
|
|
|
FetchRecentRefsDays=7
|
|
|
|
FetchRecentCommitsDays=0
|
|
|
|
FetchRecentRefsIncludeRemotes=true
|
|
|
|
PruneOffsetDays=3
|
|
|
|
PruneVerifyRemoteAlways=false
|
|
|
|
PruneRemoteName=origin
|
2017-03-10 11:27:52 +00:00
|
|
|
LfsStorageDir=%s
|
2016-05-12 15:03:03 +00:00
|
|
|
AccessDownload=none
|
|
|
|
AccessUpload=none
|
2019-07-31 13:46:39 +00:00
|
|
|
DownloadTransfers=basic,lfs-standalone-file
|
|
|
|
UploadTransfers=basic,lfs-standalone-file
|
2015-09-30 22:16:14 +00:00
|
|
|
%s
|
2015-10-16 15:31:40 +00:00
|
|
|
%s
|
2017-03-10 11:27:52 +00:00
|
|
|
" "$(git lfs version)" "$(git version)" "$localgit" "$localgitstore" "$localmedia" "$tempdir" "$lfsstorage" "$envVars" "$envInitConfig")
|
2018-05-21 20:51:10 +00:00
|
|
|
actual=$(git lfs env | grep -v "^GIT_EXEC_PATH=")
|
2015-10-21 11:49:10 +00:00
|
|
|
contains_same_elements "$expected" "$actual"
|
2015-09-30 22:16:14 +00:00
|
|
|
|
|
|
|
)
|
|
|
|
end_test
|
2015-11-16 19:17:07 +00:00
|
|
|
|
|
|
|
begin_test "env with multiple ssh remotes"
|
|
|
|
(
|
|
|
|
set -e
|
|
|
|
reponame="env-with-ssh"
|
2019-08-26 20:42:08 +00:00
|
|
|
unset_vars
|
2015-11-16 19:17:07 +00:00
|
|
|
mkdir $reponame
|
|
|
|
cd $reponame
|
|
|
|
git init
|
|
|
|
git remote add origin git@git-server.com:user/repo.git
|
|
|
|
git remote add other git@other-git-server.com:user/repo.git
|
|
|
|
|
|
|
|
expected='Endpoint=https://git-server.com/user/repo.git/info/lfs (auth=none)
|
|
|
|
SSH=git@git-server.com:user/repo.git
|
|
|
|
Endpoint (other)=https://other-git-server.com/user/repo.git/info/lfs (auth=none)
|
2017-01-04 19:24:07 +00:00
|
|
|
SSH=git@other-git-server.com:user/repo.git
|
2017-05-19 15:25:22 +00:00
|
|
|
GIT_SSH=lfs-ssh-echo'
|
2015-11-16 19:17:07 +00:00
|
|
|
|
2018-05-21 20:51:10 +00:00
|
|
|
contains_same_elements "$expected" "$(git lfs env \
|
|
|
|
| grep -v "^GIT_EXEC_PATH=" | grep -e "Endpoint" -e "SSH=")"
|
2015-11-16 19:17:07 +00:00
|
|
|
)
|
|
|
|
end_test
|
2016-05-10 10:39:09 +00:00
|
|
|
|
|
|
|
begin_test "env with skip download errors"
|
|
|
|
(
|
|
|
|
set -e
|
|
|
|
reponame="env-with-skip-dl"
|
|
|
|
git init $reponame
|
|
|
|
cd $reponame
|
|
|
|
|
|
|
|
git config lfs.skipdownloaderrors 1
|
|
|
|
|
2019-08-30 19:19:24 +00:00
|
|
|
localgit=$(canonical_path "$TRASHDIR/$reponame")
|
|
|
|
localgitstore=$(canonical_path "$TRASHDIR/$reponame")
|
|
|
|
lfsstorage=$(canonical_path "$TRASHDIR/$reponame/lfs")
|
|
|
|
localmedia=$(canonical_path "$TRASHDIR/$reponame/lfs/objects")
|
|
|
|
tempdir=$(canonical_path "$TRASHDIR/$reponame/lfs/tmp")
|
2016-05-10 10:39:09 +00:00
|
|
|
envVars=$(printf "%s" "$(env | grep "^GIT")")
|
|
|
|
|
2019-08-30 19:19:24 +00:00
|
|
|
localwd=$(canonical_path "$TRASHDIR/$reponame")
|
|
|
|
localgit=$(canonical_path "$TRASHDIR/$reponame/.git")
|
|
|
|
localgitstore=$(canonical_path "$TRASHDIR/$reponame/.git")
|
|
|
|
lfsstorage=$(canonical_path "$TRASHDIR/$reponame/.git/lfs")
|
|
|
|
localmedia=$(canonical_path "$TRASHDIR/$reponame/.git/lfs/objects")
|
|
|
|
tempdir=$(canonical_path "$TRASHDIR/$reponame/.git/lfs/tmp")
|
2016-05-10 10:39:09 +00:00
|
|
|
envVars=$(printf "%s" "$(env | grep "^GIT")")
|
|
|
|
|
|
|
|
expectedenabled=$(printf '%s
|
|
|
|
%s
|
|
|
|
|
|
|
|
LocalWorkingDir=%s
|
|
|
|
LocalGitDir=%s
|
|
|
|
LocalGitStorageDir=%s
|
|
|
|
LocalMediaDir=%s
|
2018-07-09 15:28:23 +00:00
|
|
|
LocalReferenceDirs=
|
2016-05-10 10:39:09 +00:00
|
|
|
TempDir=%s
|
2019-12-12 10:10:24 +00:00
|
|
|
ConcurrentTransfers=8
|
2016-07-26 14:52:15 +00:00
|
|
|
TusTransfers=false
|
2016-06-09 10:45:24 +00:00
|
|
|
BasicTransfersOnly=false
|
2016-05-10 10:39:09 +00:00
|
|
|
SkipDownloadErrors=true
|
2016-05-12 15:03:03 +00:00
|
|
|
FetchRecentAlways=false
|
|
|
|
FetchRecentRefsDays=7
|
|
|
|
FetchRecentCommitsDays=0
|
|
|
|
FetchRecentRefsIncludeRemotes=true
|
|
|
|
PruneOffsetDays=3
|
|
|
|
PruneVerifyRemoteAlways=false
|
|
|
|
PruneRemoteName=origin
|
2017-03-10 11:27:52 +00:00
|
|
|
LfsStorageDir=%s
|
2016-05-12 15:03:03 +00:00
|
|
|
AccessDownload=none
|
|
|
|
AccessUpload=none
|
2019-07-31 13:46:39 +00:00
|
|
|
DownloadTransfers=basic,lfs-standalone-file
|
|
|
|
UploadTransfers=basic,lfs-standalone-file
|
2016-05-10 10:39:09 +00:00
|
|
|
%s
|
|
|
|
%s
|
2017-03-10 11:27:52 +00:00
|
|
|
' "$(git lfs version)" "$(git version)" "$localwd" "$localgit" "$localgitstore" "$localmedia" "$tempdir" "$lfsstorage" "$envVars" "$envInitConfig")
|
2018-05-21 20:51:10 +00:00
|
|
|
actual=$(git lfs env | grep -v "^GIT_EXEC_PATH=")
|
2016-05-10 10:39:09 +00:00
|
|
|
contains_same_elements "$expectedenabled" "$actual"
|
|
|
|
|
|
|
|
git config --unset lfs.skipdownloaderrors
|
|
|
|
# prove it's usually off
|
|
|
|
expecteddisabled=$(printf '%s
|
|
|
|
%s
|
|
|
|
|
|
|
|
LocalWorkingDir=%s
|
|
|
|
LocalGitDir=%s
|
|
|
|
LocalGitStorageDir=%s
|
|
|
|
LocalMediaDir=%s
|
2018-07-09 15:28:23 +00:00
|
|
|
LocalReferenceDirs=
|
2016-05-10 10:39:09 +00:00
|
|
|
TempDir=%s
|
2019-12-12 10:10:24 +00:00
|
|
|
ConcurrentTransfers=8
|
2016-07-26 14:52:15 +00:00
|
|
|
TusTransfers=false
|
2016-06-09 10:45:24 +00:00
|
|
|
BasicTransfersOnly=false
|
2018-07-25 21:29:50 +00:00
|
|
|
SkipDownloadErrors=false
|
2016-05-12 15:03:03 +00:00
|
|
|
FetchRecentAlways=false
|
|
|
|
FetchRecentRefsDays=7
|
|
|
|
FetchRecentCommitsDays=0
|
|
|
|
FetchRecentRefsIncludeRemotes=true
|
|
|
|
PruneOffsetDays=3
|
|
|
|
PruneVerifyRemoteAlways=false
|
|
|
|
PruneRemoteName=origin
|
2017-03-10 11:27:52 +00:00
|
|
|
LfsStorageDir=%s
|
2016-05-12 15:03:03 +00:00
|
|
|
AccessDownload=none
|
|
|
|
AccessUpload=none
|
2019-07-31 13:46:39 +00:00
|
|
|
DownloadTransfers=basic,lfs-standalone-file
|
|
|
|
UploadTransfers=basic,lfs-standalone-file
|
2016-07-27 10:34:21 +00:00
|
|
|
%s
|
|
|
|
%s
|
2017-03-10 11:27:52 +00:00
|
|
|
' "$(git lfs version)" "$(git version)" "$localwd" "$localgit" "$localgitstore" "$localmedia" "$tempdir" "$lfsstorage" "$envVars" "$envInitConfig")
|
2018-05-21 20:51:10 +00:00
|
|
|
actual=$(git lfs env | grep -v "^GIT_EXEC_PATH=")
|
2016-07-27 10:34:21 +00:00
|
|
|
contains_same_elements "$expecteddisabled" "$actual"
|
|
|
|
|
|
|
|
# now enable via env var
|
2018-07-25 21:29:50 +00:00
|
|
|
envVarsEnabled=$(printf "%s" "$(GIT_LFS_SKIP_DOWNLOAD_ERRORS=1 env | grep "^GIT")")
|
|
|
|
expectedenabled2=$(printf '%s
|
|
|
|
%s
|
|
|
|
|
|
|
|
LocalWorkingDir=%s
|
|
|
|
LocalGitDir=%s
|
|
|
|
LocalGitStorageDir=%s
|
|
|
|
LocalMediaDir=%s
|
|
|
|
LocalReferenceDirs=
|
|
|
|
TempDir=%s
|
2019-12-12 10:10:24 +00:00
|
|
|
ConcurrentTransfers=8
|
2018-07-25 21:29:50 +00:00
|
|
|
TusTransfers=false
|
|
|
|
BasicTransfersOnly=false
|
|
|
|
SkipDownloadErrors=true
|
|
|
|
FetchRecentAlways=false
|
|
|
|
FetchRecentRefsDays=7
|
|
|
|
FetchRecentCommitsDays=0
|
|
|
|
FetchRecentRefsIncludeRemotes=true
|
|
|
|
PruneOffsetDays=3
|
|
|
|
PruneVerifyRemoteAlways=false
|
|
|
|
PruneRemoteName=origin
|
|
|
|
LfsStorageDir=%s
|
|
|
|
AccessDownload=none
|
|
|
|
AccessUpload=none
|
2019-07-31 13:46:39 +00:00
|
|
|
DownloadTransfers=basic,lfs-standalone-file
|
|
|
|
UploadTransfers=basic,lfs-standalone-file
|
2018-07-25 21:29:50 +00:00
|
|
|
%s
|
|
|
|
%s
|
|
|
|
' "$(git lfs version)" "$(git version)" "$localwd" "$localgit" "$localgitstore" "$localmedia" "$tempdir" "$lfsstorage" "$envVarsEnabled" "$envInitConfig")
|
2018-05-21 20:51:10 +00:00
|
|
|
actual=$(GIT_LFS_SKIP_DOWNLOAD_ERRORS=1 git lfs env | grep -v "^GIT_EXEC_PATH=")
|
2018-07-25 21:29:50 +00:00
|
|
|
contains_same_elements "$expectedenabled2" "$actual"
|
2016-07-27 10:34:21 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
)
|
|
|
|
end_test
|
|
|
|
|
|
|
|
begin_test "env with extra transfer methods"
|
|
|
|
(
|
|
|
|
set -e
|
|
|
|
reponame="env-with-transfers"
|
2019-08-26 20:42:08 +00:00
|
|
|
unset_vars
|
2016-07-27 10:34:21 +00:00
|
|
|
git init $reponame
|
|
|
|
cd $reponame
|
|
|
|
|
|
|
|
git config lfs.tustransfers true
|
|
|
|
git config lfs.customtransfer.supertransfer.path /path/to/something
|
|
|
|
|
2019-08-30 19:19:24 +00:00
|
|
|
localgit=$(canonical_path "$TRASHDIR/$reponame")
|
|
|
|
localgitstore=$(canonical_path "$TRASHDIR/$reponame")
|
|
|
|
lfsstorage=$(canonical_path "$TRASHDIR/$reponame/lfs")
|
|
|
|
localmedia=$(canonical_path "$TRASHDIR/$reponame/lfs/objects")
|
|
|
|
tempdir=$(canonical_path "$TRASHDIR/$reponame/lfs/tmp")
|
2016-07-27 10:34:21 +00:00
|
|
|
envVars=$(printf "%s" "$(env | grep "^GIT")")
|
|
|
|
|
2019-08-30 19:19:24 +00:00
|
|
|
localwd=$(canonical_path "$TRASHDIR/$reponame")
|
|
|
|
localgit=$(canonical_path "$TRASHDIR/$reponame/.git")
|
|
|
|
localgitstore=$(canonical_path "$TRASHDIR/$reponame/.git")
|
|
|
|
lfsstorage=$(canonical_path "$TRASHDIR/$reponame/.git/lfs")
|
|
|
|
localmedia=$(canonical_path "$TRASHDIR/$reponame/.git/lfs/objects")
|
|
|
|
tempdir=$(canonical_path "$TRASHDIR/$reponame/.git/lfs/tmp")
|
2016-07-27 10:34:21 +00:00
|
|
|
envVars=$(printf "%s" "$(env | grep "^GIT")")
|
|
|
|
|
|
|
|
expectedenabled=$(printf '%s
|
|
|
|
%s
|
|
|
|
|
|
|
|
LocalWorkingDir=%s
|
|
|
|
LocalGitDir=%s
|
|
|
|
LocalGitStorageDir=%s
|
|
|
|
LocalMediaDir=%s
|
2018-07-09 15:28:23 +00:00
|
|
|
LocalReferenceDirs=
|
2016-07-27 10:34:21 +00:00
|
|
|
TempDir=%s
|
2019-12-12 10:10:24 +00:00
|
|
|
ConcurrentTransfers=8
|
2016-07-27 10:34:21 +00:00
|
|
|
TusTransfers=true
|
|
|
|
BasicTransfersOnly=false
|
|
|
|
SkipDownloadErrors=false
|
|
|
|
FetchRecentAlways=false
|
|
|
|
FetchRecentRefsDays=7
|
|
|
|
FetchRecentCommitsDays=0
|
|
|
|
FetchRecentRefsIncludeRemotes=true
|
|
|
|
PruneOffsetDays=3
|
|
|
|
PruneVerifyRemoteAlways=false
|
|
|
|
PruneRemoteName=origin
|
2017-03-10 11:27:52 +00:00
|
|
|
LfsStorageDir=%s
|
2016-07-27 10:34:21 +00:00
|
|
|
AccessDownload=none
|
|
|
|
AccessUpload=none
|
2019-07-31 13:46:39 +00:00
|
|
|
DownloadTransfers=basic,lfs-standalone-file,supertransfer
|
|
|
|
UploadTransfers=basic,lfs-standalone-file,supertransfer,tus
|
2016-07-27 10:34:21 +00:00
|
|
|
%s
|
|
|
|
%s
|
2017-03-10 11:27:52 +00:00
|
|
|
' "$(git lfs version)" "$(git version)" "$localwd" "$localgit" "$localgitstore" "$localmedia" "$tempdir" "$lfsstorage" "$envVars" "$envInitConfig")
|
2018-05-21 20:51:10 +00:00
|
|
|
actual=$(git lfs env | grep -v "^GIT_EXEC_PATH=")
|
2016-07-27 10:34:21 +00:00
|
|
|
contains_same_elements "$expectedenabled" "$actual"
|
|
|
|
|
2016-05-10 10:39:09 +00:00
|
|
|
)
|
|
|
|
end_test
|
2018-07-26 18:40:47 +00:00
|
|
|
|
|
|
|
begin_test "env with multiple remotes and ref"
|
|
|
|
(
|
|
|
|
set -e
|
|
|
|
reponame="env-multiple-remotes-ref"
|
2019-08-26 20:42:08 +00:00
|
|
|
unset_vars
|
2018-07-26 18:40:47 +00:00
|
|
|
mkdir $reponame
|
|
|
|
cd $reponame
|
|
|
|
git init
|
|
|
|
git remote add origin "$GITSERVER/env-origin-remote"
|
|
|
|
git remote add other "$GITSERVER/env-other-remote"
|
|
|
|
|
|
|
|
touch a.txt
|
|
|
|
git add a.txt
|
|
|
|
git commit -m "initial commit"
|
|
|
|
|
|
|
|
endpoint="$GITSERVER/env-origin-remote.git/info/lfs (auth=none)"
|
|
|
|
endpoint2="$GITSERVER/env-other-remote.git/info/lfs (auth=none)"
|
2019-08-30 19:19:24 +00:00
|
|
|
localwd=$(canonical_path "$TRASHDIR/$reponame")
|
|
|
|
localgit=$(canonical_path "$TRASHDIR/$reponame/.git")
|
|
|
|
localgitstore=$(canonical_path "$TRASHDIR/$reponame/.git")
|
|
|
|
lfsstorage=$(canonical_path "$TRASHDIR/$reponame/.git/lfs")
|
|
|
|
localmedia=$(canonical_path "$TRASHDIR/$reponame/.git/lfs/objects")
|
|
|
|
tempdir=$(canonical_path "$TRASHDIR/$reponame/.git/lfs/tmp")
|
2018-07-26 18:40:47 +00:00
|
|
|
envVars=$(printf "%s" "$(env | grep "^GIT")")
|
|
|
|
expected=$(printf '%s
|
|
|
|
%s
|
|
|
|
|
|
|
|
Endpoint=%s
|
|
|
|
Endpoint (other)=%s
|
|
|
|
LocalWorkingDir=%s
|
|
|
|
LocalGitDir=%s
|
|
|
|
LocalGitStorageDir=%s
|
|
|
|
LocalMediaDir=%s
|
|
|
|
LocalReferenceDirs=
|
|
|
|
TempDir=%s
|
2019-12-12 10:10:24 +00:00
|
|
|
ConcurrentTransfers=8
|
2018-07-26 18:40:47 +00:00
|
|
|
TusTransfers=false
|
|
|
|
BasicTransfersOnly=false
|
|
|
|
SkipDownloadErrors=false
|
|
|
|
FetchRecentAlways=false
|
|
|
|
FetchRecentRefsDays=7
|
|
|
|
FetchRecentCommitsDays=0
|
|
|
|
FetchRecentRefsIncludeRemotes=true
|
|
|
|
PruneOffsetDays=3
|
|
|
|
PruneVerifyRemoteAlways=false
|
|
|
|
PruneRemoteName=origin
|
|
|
|
LfsStorageDir=%s
|
|
|
|
AccessDownload=none
|
|
|
|
AccessUpload=none
|
2019-07-31 13:46:39 +00:00
|
|
|
DownloadTransfers=basic,lfs-standalone-file
|
|
|
|
UploadTransfers=basic,lfs-standalone-file
|
2018-07-26 18:40:47 +00:00
|
|
|
%s
|
|
|
|
%s
|
|
|
|
' "$(git lfs version)" "$(git version)" "$endpoint" "$endpoint2" "$localwd" "$localgit" "$localgitstore" "$localmedia" "$tempdir" "$lfsstorage" "$envVars" "$envInitConfig")
|
|
|
|
actual=$(git lfs env | grep -v "^GIT_EXEC_PATH=")
|
|
|
|
contains_same_elements "$expected" "$actual"
|
|
|
|
)
|
|
|
|
end_test
|