diff options
author | yorah <yoram.harmelin@gmail.com> | 2013-06-21 16:21:49 +0400 |
---|---|---|
committer | yorah <yoram.harmelin@gmail.com> | 2013-06-22 19:27:31 +0400 |
commit | 7a90218d09e482985e0d7aef782a36aaf564a307 (patch) | |
tree | ff3be3eb1a1ef38911d684033a10a39d0f5ff127 /LibGit2Sharp/IRepository.cs | |
parent | 5e40bff48e705125355a7c37c25951b2e4e6e0f8 (diff) |
Create a new repo.Checkout() overload which accepts a Commit object
Diffstat (limited to 'LibGit2Sharp/IRepository.cs')
-rw-r--r-- | LibGit2Sharp/IRepository.cs | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/LibGit2Sharp/IRepository.cs b/LibGit2Sharp/IRepository.cs index f1acef0d..6e3faea5 100644 --- a/LibGit2Sharp/IRepository.cs +++ b/LibGit2Sharp/IRepository.cs @@ -72,7 +72,11 @@ namespace LibGit2Sharp SubmoduleCollection Submodules { get; } /// <summary> - /// Checkout the specified <see cref = "Branch" />. + /// Checkout the commit pointed at by the tip of the specified <see cref = "Branch" />. + /// <para> + /// If this commit is the current tip of the branch as it exists in the repository, the HEAD + /// will point to this branch. Otherwise, the HEAD will be detached, pointing at the commit sha. + /// </para> /// </summary> /// <param name="branch">The <see cref = "Branch" /> to check out. </param> /// <param name="checkoutOptions"><see cref = "CheckoutOptions" /> controlling checkout behavior.</param> @@ -90,6 +94,18 @@ namespace LibGit2Sharp Branch Checkout(string committishOrBranchSpec, CheckoutOptions checkoutOptions, CheckoutProgressHandler onCheckoutProgress); /// <summary> + /// Checkout the specified <see cref = "Commit" />. + /// <para> + /// Will detach the HEAD and make it point to this commit sha. + /// </para> + /// </summary> + /// <param name="commit">The <see cref = "Commit" /> to check out. </param> + /// <param name="checkoutOptions"><see cref = "CheckoutOptions" /> controlling checkout behavior.</param> + /// <param name="onCheckoutProgress"><see cref = "CheckoutProgressHandler" /> that checkout progress is reported through.</param> + /// <returns>The <see cref = "Branch" /> that was checked out.</returns> + Branch Checkout(Commit commit, CheckoutOptions checkoutOptions, CheckoutProgressHandler onCheckoutProgress); + + /// <summary> /// Try to lookup an object by its <see cref = "ObjectId" />. If no matching object is found, null will be returned. /// </summary> /// <param name = "id">The id to lookup.</param> |