using System; using System.Collections.Generic; using LibGit2Sharp.Handlers; namespace LibGit2Sharp { /// /// A Repository is the primary interface into a git repository /// public interface IRepository : IDisposable { /// /// Shortcut to return the branch pointed to by HEAD /// /// Branch Head { get; } /// /// Provides access to the configuration settings for this repository. /// Configuration Config { get; } /// /// Gets the index. /// Index Index { get; } /// /// Lookup and enumerate references in the repository. /// ReferenceCollection Refs { get; } /// /// Lookup and enumerate commits in the repository. /// Iterating this collection directly starts walking from the HEAD. /// IQueryableCommitLog Commits { get; } /// /// Lookup and enumerate branches in the repository. /// BranchCollection Branches { get; } /// /// Lookup and enumerate tags in the repository. /// TagCollection Tags { get; } /// /// Provides high level information about this repository. /// RepositoryInformation Info { get; } /// /// Provides access to diffing functionalities to show changes between the working tree and the index or a tree, changes between the index and a tree, changes between two trees, or changes between two files on disk. /// Diff Diff {get;} /// /// Gets the database. /// ObjectDatabase ObjectDatabase { get; } /// /// Lookup notes in the repository. /// NoteCollection Notes { get; } /// /// Submodules in the repository. /// SubmoduleCollection Submodules { get; } /// /// Checkout the specified . /// /// The to check out. /// controlling checkout behavior. /// that checkout progress is reported through. /// The that was checked out. Branch Checkout(Branch branch, CheckoutOptions checkoutOptions, CheckoutProgressHandler onCheckoutProgress); /// /// Checkout the specified branch, reference or SHA. /// /// A revparse spec for the commit or branch to checkout. /// Options controlling checkout behavior. /// Callback method to report checkout progress updates through. /// The new HEAD. Branch Checkout(string committishOrBranchSpec, CheckoutOptions checkoutOptions, CheckoutProgressHandler onCheckoutProgress); /// /// Try to lookup an object by its . If no matching object is found, null will be returned. /// /// The id to lookup. /// The or null if it was not found. GitObject Lookup(ObjectId id); /// /// Try to lookup an object by its sha or a reference canonical name. If no matching object is found, null will be returned. /// /// A revparse spec for the object to lookup. /// The or null if it was not found. GitObject Lookup(string objectish); /// /// Try to lookup an object by its and . If no matching object is found, null will be returned. /// /// The id to lookup. /// The kind of GitObject being looked up /// The or null if it was not found. GitObject Lookup(ObjectId id, ObjectType type); /// /// Try to lookup an object by its sha or a reference canonical name and . If no matching object is found, null will be returned. /// /// A revparse spec for the object to lookup. /// The kind of being looked up /// The or null if it was not found. GitObject Lookup(string objectish, ObjectType type); /// /// Stores the content of the as a new into the repository. /// The tip of the will be used as the parent of this new Commit. /// Once the commit is created, the will move forward to point at it. /// /// The description of why a change was made to the repository. /// The of who made the change. /// The of who added the change to the repository. /// True to amend the current pointed at by , false otherwise. /// The generated . Commit Commit(string message, Signature author, Signature committer, bool amendPreviousCommit = false); /// /// Sets the current to the specified commit and optionally resets the and /// the content of the working tree to match. /// /// Flavor of reset operation to perform. /// The target commit object. void Reset(ResetOptions resetOptions, Commit commit); /// /// Replaces entries in the with entries from the specified commit. /// /// The target commit object. /// The list of paths (either files or directories) that should be considered. /// /// If set, the passed will be treated as explicit paths. /// Use these options to determine how unmatched explicit paths should be handled. /// void Reset(Commit commit, IEnumerable paths = null, ExplicitPathsOptions explicitPathsOptions = null); /// /// Clean the working tree by removing files that are not under version control. /// void RemoveUntrackedFiles(); /// /// Gets the references to the tips that are currently being merged. /// IEnumerable MergeHeads { get; } /// /// Provides access to network functionality for a repository. /// Network Network { get; } } }