Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

command/env: ensure we honor lfs.url #3470

Merged
merged 1 commit into from
Jan 14, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion commands/command_env.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ func envCommand(cmd *cobra.Command, args []string) {
if remote == defaultRemote {
continue
}
remoteEndpoint := getAPIClient().Endpoints.RemoteEndpoint("download", remote)
remoteEndpoint := getAPIClient().Endpoints.Endpoint("download", remote)
remoteAccess := getAPIClient().Endpoints.AccessFor(remoteEndpoint.Url)
Print("Endpoint (%s)=%s (auth=%s)", remote, remoteEndpoint.Url, remoteAccess.Mode())
if len(remoteEndpoint.SshUserAndHost) > 0 {
Expand Down
12 changes: 5 additions & 7 deletions t/t-env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,6 @@ begin_test "env with multiple remotes and lfs.url config"
git remote add other "$GITSERVER/env-other-remote"
git config lfs.url "http://foo/bar"

endpoint="$GITSERVER/env-other-remote.git/info/lfs (auth=none)"
localwd=$(native_path "$TRASHDIR/$reponame")
localgit=$(native_path "$TRASHDIR/$reponame/.git")
localgitstore=$(native_path "$TRASHDIR/$reponame/.git")
Expand All @@ -251,7 +250,7 @@ begin_test "env with multiple remotes and lfs.url config"
%s

Endpoint=http://foo/bar (auth=none)
Endpoint (other)=%s
Endpoint (other)=http://foo/bar (auth=none)
LocalWorkingDir=%s
LocalGitDir=%s
LocalGitStorageDir=%s
Expand All @@ -276,7 +275,7 @@ DownloadTransfers=basic
UploadTransfers=basic
%s
%s
' "$(git lfs version)" "$(git version)" "$endpoint" "$localwd" "$localgit" "$localgitstore" "$localmedia" "$tempdir" "$lfsstorage" "$envVars" "$envInitConfig")
' "$(git lfs version)" "$(git version)" "$localwd" "$localgit" "$localgitstore" "$localmedia" "$tempdir" "$lfsstorage" "$envVars" "$envInitConfig")
actual=$(git lfs env | grep -v "^GIT_EXEC_PATH=")
contains_same_elements "$expected" "$actual"

Expand Down Expand Up @@ -311,7 +310,7 @@ begin_test "env with multiple remotes and lfs configs"
%s

Endpoint=http://foo/bar (auth=none)
Endpoint (other)=http://custom/other (auth=none)
Endpoint (other)=http://foo/bar (auth=none)
LocalWorkingDir=%s
LocalGitDir=%s
LocalGitStorageDir=%s
Expand Down Expand Up @@ -347,7 +346,7 @@ UploadTransfers=basic
)
end_test

begin_test "env with multiple remotes and lfs url and batch configs"
begin_test "env with multiple remotes and batch configs"
(
set -e
reponame="env-multiple-remotes-lfs-batch-configs"
Expand All @@ -356,9 +355,8 @@ begin_test "env with multiple remotes and lfs url and batch configs"
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 lfs.concurrenttransfers 5
git config remote.origin.lfsurl "http://custom/origin"
git config remote.origin.lfsurl "http://foo/bar"
git config remote.other.lfsurl "http://custom/other"

localwd=$(native_path "$TRASHDIR/$reponame")
Expand Down