This repository was archived by the owner on Oct 17, 2021. It is now read-only.
-
Couldn't load subscription status.
- Fork 5
Repository
mattt edited this page Sep 1, 2020
·
9 revisions
public final class RepositoryThe repository's working directory.
var commonDirectory: URL?For example, path/to/repository/.git.
The repository's working directory,
or nil if the repository is bare.
var workingDirectory: URL?For example, path/to/repository.
The repository index, if any.
var index: Index?The HEAD of the repository.
var head: Head?var attributes: Attributespublic class func open(at url: URL) throws -> Repositorypublic class func create(at url: URL, bare: Bool = false) throws -> Repositorypublic class func discover(at url: URL, acrossFileSystems: Bool = true, stoppingAt ceilingDirectories: [String] = []) throws -> Repository@discardableResult public static func clone(from remoteURL: URL, to localURL: URL, configuration: Clone.Configuration = .default) throws -> RepositoryReturns a branch by name.
public func branch(named name: String) throws -> Branch?Returns the revision matching the provided specification.
public func revision(matching specification: String) throws -> (Commit?, Reference?)- specification: A revision specification.
- Returns: A tuple containing the commit and/or reference matching the specification.
Calculates the number of unique revisions between two commits.
public func distance(from local: Commit, to upstream: Commit) throws -> (ahead: Int, behind: Int)- local: The local commit.
- upstream: The upstream commit.
- Returns: A tuple with the number of commits
aheadandbehind.
@discardableResult public func createCommit(message: String, author: Signature? = nil, committer: Signature? = nil) throws -> CommitCreates a lightweight tag.
public func createLightweightTag(named name: String, target: Object, force: Bool = false) throwsCreates an annotated tag.
public func createAnnotatedTag(named name: String, target: Object, tagger: Signature? = nil, message: String, force: Bool = false) throwspublic func tagNames() throws -> [String]public func tagNames(matching pattern: String) throws -> [String]Returns a sequence of revisions according to the specified configuration.
public func revisions(with configuration: (RevisionWalker) throws -> Void) throws -> AnySequence<Commit>- configuration: A closure whose argument can be modified to change which revisions are returned by the sequence, and the order in which they appear.
Any error that occured during configuration.
A sequence of revisions.
Generated at 2020-09-02T17:06:43+0000 using swift-doc 1.0.0-beta.4.
Types
- Blob
- Branch
- Commit
- Credentials
- Error
- Message
- Note
- Object
- Object.ID
- Reference
- Reference.Format
- Remote
- Remote.Fetch
- Remote.Fetch.Configuration
- Remote.Fetch.TagFollowing
- Repository
- Repository.Attributes
- Repository.Attributes.Value
- Repository.Checkout
- Repository.Checkout.Configuration
- Repository.Checkout.ConflictResolution
- Repository.Checkout.Strategy
- Repository.Clone
- Repository.Clone.Configuration
- Repository.Clone.Local
- Repository.Head
- Repository.Index
- Repository.Index.Entry
- Repository.Index.Stage
- RevisionSortingOptions
- Signature
- Tag
- Tag.Annotation
- Tree
- Tree.Entry