diff options
Diffstat (limited to 'LibGit2Sharp/IRepository.cs')
-rw-r--r-- | LibGit2Sharp/IRepository.cs | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/LibGit2Sharp/IRepository.cs b/LibGit2Sharp/IRepository.cs index 44e40d2a..28ce2989 100644 --- a/LibGit2Sharp/IRepository.cs +++ b/LibGit2Sharp/IRepository.cs @@ -83,6 +83,7 @@ namespace LibGit2Sharp /// <param name="checkoutNotificationOptions"><see cref="CheckoutNotificationOptions"/> to manage checkout notifications.</param> /// <param name="signature">Identity for use when updating the reflog.</param> /// <returns>The <see cref="Branch"/> that was checked out.</returns> + [Obsolete("This overload will be removed in the next release. Please use Repository.Checkout(Branch, CheckoutOptions, Signature) instead.")] Branch Checkout(Branch branch, CheckoutModifiers checkoutModifiers, CheckoutProgressHandler onCheckoutProgress, CheckoutNotificationOptions checkoutNotificationOptions, Signature signature = null); /// <summary> @@ -98,6 +99,7 @@ namespace LibGit2Sharp /// <param name="checkoutNotificationOptions"><see cref="CheckoutNotificationOptions"/> to manage checkout notifications.</param> /// <param name="signature">Identity for use when updating the reflog.</param> /// <returns>The <see cref="Branch"/> that was checked out.</returns> + [Obsolete("This overload will be removed in the next release. Please use Repository.Checkout(string, CheckoutOptions, Signature) instead.")] Branch Checkout(string committishOrBranchSpec, CheckoutModifiers checkoutModifiers, CheckoutProgressHandler onCheckoutProgress, CheckoutNotificationOptions checkoutNotificationOptions, Signature signature = null); /// <summary> @@ -112,9 +114,48 @@ namespace LibGit2Sharp /// <param name="checkoutNotificationOptions"><see cref="CheckoutNotificationOptions"/> to manage checkout notifications.</param> /// <param name="signature">Identity for use when updating the reflog.</param> /// <returns>The <see cref="Branch"/> that was checked out.</returns> + [Obsolete("This overload will be removed in the next release. Please use Repository.Checkout(Commit, CheckoutOptions, Signature) instead.")] Branch Checkout(Commit commit, CheckoutModifiers checkoutModifiers, CheckoutProgressHandler onCheckoutProgress, CheckoutNotificationOptions checkoutNotificationOptions, Signature signature = null); /// <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="options"><see cref="CheckoutOptions"/> controlling checkout behavior.</param> + /// <param name="signature">Identity for use when updating the reflog.</param> + /// <returns>The <see cref="Branch"/> that was checked out.</returns> + Branch Checkout(Branch branch, CheckoutOptions options, Signature signature = null); + + /// <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="options"><see cref="CheckoutOptions"/> controlling checkout behavior.</param> + /// <param name="signature">Identity for use when updating the reflog.</param> + /// <returns>The <see cref="Branch"/> that was checked out.</returns> + Branch Checkout(string committishOrBranchSpec, CheckoutOptions options, Signature signature = null); + + /// <summary> + /// Checkout the specified <see cref="LibGit2Sharp.Commit"/>. + /// <para> + /// Will detach the HEAD and make it point to this commit sha. + /// </para> + /// </summary> + /// <param name="commit">The <see cref="LibGit2Sharp.Commit"/> to check out.</param> + /// <param name="options"><see cref="CheckoutOptions"/> controlling checkout behavior.</param> + /// <param name="signature">Identity for use when updating the reflog.</param> + /// <returns>The <see cref="Branch"/> that was checked out.</returns> + Branch Checkout(Commit commit, CheckoutOptions options, Signature signature = null); + + /// <summary> /// Updates specifed paths in the index and working directory with the versions from the specified branch, reference, or SHA. /// <para> /// This method does not switch branches or update the current repository HEAD. |