diff options
author | Jameson Miller <jamill@microsoft.com> | 2013-06-25 00:22:48 +0400 |
---|---|---|
committer | Jameson Miller <jamill@microsoft.com> | 2013-06-25 23:55:34 +0400 |
commit | ca7470b4ae3b005330f7a3bb9e188991caf23a6c (patch) | |
tree | e4e903ee57e4c074b0f455652c4e873ec6e20625 /LibGit2Sharp/IRepository.cs | |
parent | d321e933ca707737a6e0f97bf0b3352f1b0a3627 (diff) |
Teach checkout to report notifications
Diffstat (limited to 'LibGit2Sharp/IRepository.cs')
-rw-r--r-- | LibGit2Sharp/IRepository.cs | 39 |
1 files changed, 37 insertions, 2 deletions
diff --git a/LibGit2Sharp/IRepository.cs b/LibGit2Sharp/IRepository.cs index 6e3faea5..e73d0f7b 100644 --- a/LibGit2Sharp/IRepository.cs +++ b/LibGit2Sharp/IRepository.cs @@ -82,18 +82,52 @@ namespace LibGit2Sharp /// <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> + [Obsolete("This method will be removed in the next release. Please use Checkout(Branch, CheckoutOptions, CheckoutProgressHandler, CheckoutNotificationOptions) instead.")] Branch Checkout(Branch branch, CheckoutOptions checkoutOptions, CheckoutProgressHandler onCheckoutProgress); /// <summary> + /// 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> + /// <param name="onCheckoutProgress"><see cref = "CheckoutProgressHandler" /> that checkout progress is reported through.</param> + /// <param name="checkoutNotificationOptions"><see cref="CheckoutNotificationOptions"/> to manage checkout notifications.</param> + /// <returns>The <see cref = "Branch" /> that was checked out.</returns> + Branch Checkout(Branch branch, CheckoutOptions checkoutOptions, CheckoutProgressHandler onCheckoutProgress, CheckoutNotificationOptions checkoutNotificationOptions); + + /// <summary> /// Checkout the specified branch, reference or SHA. + /// <para> + /// If the committishOrBranchSpec parameter resolves to a branch name, then the checked out HEAD will + /// will point to the branch. Otherwise, the HEAD will be detached, pointing at the commit sha. + /// </para> /// </summary> /// <param name = "committishOrBranchSpec">A revparse spec for the commit or branch to checkout.</param> /// <param name="checkoutOptions">Options controlling checkout behavior.</param> /// <param name="onCheckoutProgress">Callback method to report checkout progress updates through.</param> - /// <returns>The new HEAD.</returns> + /// <returns>The <see cref = "Branch" /> that was checked out.</returns> + [Obsolete("This method will be removed in the next release. Please use Checkout(string, CheckoutOptions, CheckoutProgressHandler, CheckoutNotificationOptions) instead.")] Branch Checkout(string committishOrBranchSpec, CheckoutOptions checkoutOptions, CheckoutProgressHandler onCheckoutProgress); /// <summary> + /// Checkout the specified branch, reference or SHA. + /// <para> + /// If the committishOrBranchSpec parameter resolves to a branch name, then the checked out HEAD will + /// will point to the branch. Otherwise, the HEAD will be detached, pointing at the commit sha. + /// </para> + /// </summary> + /// <param name = "committishOrBranchSpec">A revparse spec for the commit or branch to checkout.</param> + /// <param name="checkoutOptions">Options controlling checkout behavior.</param> + /// <param name="onCheckoutProgress">Callback method to report checkout progress updates through.</param> + /// <param name="checkoutNotificationOptions"><see cref="CheckoutNotificationOptions"/> to manage checkout notifications.</param> + /// <returns>The <see cref = "Branch" /> that was checked out.</returns> + Branch Checkout(string committishOrBranchSpec, CheckoutOptions checkoutOptions, CheckoutProgressHandler onCheckoutProgress, CheckoutNotificationOptions checkoutNotificationOptions); + + /// <summary> /// Checkout the specified <see cref = "Commit" />. /// <para> /// Will detach the HEAD and make it point to this commit sha. @@ -102,8 +136,9 @@ namespace LibGit2Sharp /// <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> + /// <param name="checkoutNotificationOptions"><see cref="CheckoutNotificationOptions"/> to manage checkout notifications.</param> /// <returns>The <see cref = "Branch" /> that was checked out.</returns> - Branch Checkout(Commit commit, CheckoutOptions checkoutOptions, CheckoutProgressHandler onCheckoutProgress); + Branch Checkout(Commit commit, CheckoutOptions checkoutOptions, CheckoutProgressHandler onCheckoutProgress, CheckoutNotificationOptions checkoutNotificationOptions); /// <summary> /// Try to lookup an object by its <see cref = "ObjectId" />. If no matching object is found, null will be returned. |