Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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 internal/job/checkout.go
Original file line number Diff line number Diff line change
Expand Up @@ -538,7 +538,7 @@ func (e *Executor) updateRemoteURL(ctx context.Context, gitDir, repository strin

// First check what the existing remote is, for both logging and debugging
// purposes.
args := []string{"remote", "get-url", "origin"}
args := []string{"config", "--get", "remote.origin.url"}
if gitDir != "" {
args = append([]string{"--git-dir", gitDir}, args...)
}
Expand Down
6 changes: 3 additions & 3 deletions internal/job/integration/checkout_integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@ func TestCheckingOutLocalGitProjectWithShortCommitHash(t *testing.T) {
// Git should attempt to fetch the shortHash, but fail. Then fallback to fetching
// all the heads and tags and checking out the short commit hash.
git.ExpectAll([][]any{
{"remote", "get-url", "origin"},
{"config", "--get", "remote.origin.url"},
{"clean", "-ffxdq"},
{"fetch", "--", "origin", shortCommitHash},
{"config", "remote.origin.fetch"},
Expand Down Expand Up @@ -615,7 +615,7 @@ func TestCheckoutErrorIsRetried(t *testing.T) {

// But assert which ones are called
git.ExpectAll([][]any{
{"remote", "get-url", "origin"},
{"config", "--get", "remote.origin.url"},
{"clean", "-fdq"},
{"fetch", "-v", "--", "origin", "main"},
{"checkout", "-f", "FETCH_HEAD"},
Expand Down Expand Up @@ -678,7 +678,7 @@ func TestFetchErrorIsRetried(t *testing.T) {

// But assert which ones are called
git.ExpectAll([][]any{
{"remote", "get-url", "origin"},
{"config", "--get", "remote.origin.url"},
{"clean", "-ffxdq"},
{"fetch", "-v", "--prune", "--depth=1", "--", "origin", "main"},
{"clone", "-v", "--depth=1", "--", tester.Repo.Path, "."},
Expand Down