Something went wrong. Try again.
This repository has no description
Something went wrong. Try again.
1.7 kB · 46 lines
Swift
at main
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647import Dependenciesimport DependenciesMacrosimport Foundation
@DependencyClientpublic struct SourceControlClient: Sendable { public var mergeFile: @Sendable ( SourceControlFileMergeRequest ) async throws -> SourceControlFileMergeResult public var initialize: @Sendable (URL) async throws -> Repository public var clone: @Sendable (CloneRequest) async throws -> Repository public var open: @Sendable (URL) async throws -> Repository public var fetch: @Sendable (FetchRequest) async throws -> Void public var checkout: @Sendable (CheckoutRequest) async throws -> Void public var resolveRevision: @Sendable (ResolveRevisionRequest) async throws -> CommitID public var createBranch: @Sendable (CreateBranchRequest) async throws -> Branch public var status: @Sendable (Repository) async throws -> [StatusEntry] public var stage: @Sendable (StageRequest) async throws -> Void public var commit: @Sendable (CommitRequest) async throws -> Commit public var formatPatch: @Sendable (FormatPatchRequest) async throws -> Data public var emailPatch: @Sendable (EmailPatchRequest) async throws -> Data public var push: @Sendable (PushRequest) async throws -> Void}
public extension SourceControlClient { static var unimplemented: Self { Self() }}
public extension DependencyValues { var sourceControl: SourceControlClient { get { self[SourceControlClientKey.self] } set { self[SourceControlClientKey.self] = newValue } }}
private enum SourceControlClientKey: DependencyKey { static var liveValue: SourceControlClient { .unimplemented }
static var testValue: SourceControlClient { .unimplemented }}