Skip to content

Restore RepositorySpecifier.Location.gitURL #6725

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

Merged
merged 1 commit into from
Jul 19, 2023
Merged
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
6 changes: 3 additions & 3 deletions Sources/SourceControl/GitRepository.swift
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ public struct GitRepositoryProvider: RepositoryProvider, Cancellable {

try self.clone(
repository,
repository.location.SourceControlURL,
repository.location.gitURL,
path.pathString,
["--mirror"],
progress: progressHandler
Expand Down Expand Up @@ -256,7 +256,7 @@ public struct GitRepositoryProvider: RepositoryProvider, Cancellable {
// In destination repo remove the remote which will be pointing to the source repo.
let clone = GitRepository(git: self.git, path: destinationPath)
// Set the original remote to the new clone.
try clone.setURL(remote: origin, url: repository.location.SourceControlURL)
try clone.setURL(remote: origin, url: repository.location.gitURL)
// FIXME: This is unfortunate that we have to fetch to update remote's data.
try clone.fetch()
} else {
Expand Down Expand Up @@ -1382,7 +1382,7 @@ private func gitFetchStatusFilter(_ bytes: [UInt8], progress: FetchProgress.Hand
}

extension RepositorySpecifier.Location {
fileprivate var SourceControlURL: String {
fileprivate var gitURL: String {
switch self {
case .path(let path):
return path.pathString
Expand Down