Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/libgit2sharp.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornulltoken <emeric.fermas@gmail.com>2013-06-26 19:23:37 +0400
committernulltoken <emeric.fermas@gmail.com>2013-06-28 22:16:53 +0400
commit8dfa16f0ca2cbeba241a0373915f8314348b8a9b (patch)
tree6af65b857eec5ffab260922b8278e522d0d5f56d /LibGit2Sharp/Repository.cs
parent5b32d273ca2220d49a98fa3b6ad02d35f86569c7 (diff)
Reintroduce obsolete method to avoid breaking change
Diffstat (limited to 'LibGit2Sharp/Repository.cs')
-rw-r--r--LibGit2Sharp/Repository.cs18
1 files changed, 18 insertions, 0 deletions
diff --git a/LibGit2Sharp/Repository.cs b/LibGit2Sharp/Repository.cs
index 2c8687a7..2472904f 100644
--- a/LibGit2Sharp/Repository.cs
+++ b/LibGit2Sharp/Repository.cs
@@ -768,6 +768,24 @@ namespace LibGit2Sharp
/// <param name="commit">The <see cref = "LibGit2Sharp.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>
+ [Obsolete("This method will be removed in the next release. Please use Checkout(Commit, CheckoutOptions, CheckoutProgressHandler, CheckoutNotificationOptions) instead.")]
+ public Branch Checkout(Commit commit, CheckoutOptions checkoutOptions, CheckoutProgressHandler onCheckoutProgress)
+ {
+ CheckoutTree(commit.Tree, checkoutOptions, onCheckoutProgress, null, commit.Id.Sha, commit.Id.Sha, true);
+
+ return Head;
+ }
+
+ /// <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="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>
public Branch Checkout(Commit commit, CheckoutOptions checkoutOptions, CheckoutProgressHandler onCheckoutProgress, CheckoutNotificationOptions checkoutNotificationOptions)