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:
authorPavel Belousov <pavel.mephi@gmail.com>2013-11-07 20:42:36 +0400
committerPavel Belousov <pavel.mephi@gmail.com>2013-11-08 07:20:07 +0400
commit2553c80114040517be2495ea081fa6384a60fbb4 (patch)
treefa03cec59959d76f4df42a2a607666f794c430e6 /LibGit2Sharp/Repository.cs
parent5e62858541fcb6c0dd708cc61a1488a7fa48d47d (diff)
Deprecated ResetOptions in favor ResetMode.
Diffstat (limited to 'LibGit2Sharp/Repository.cs')
-rw-r--r--LibGit2Sharp/Repository.cs14
1 files changed, 13 insertions, 1 deletions
diff --git a/LibGit2Sharp/Repository.cs b/LibGit2Sharp/Repository.cs
index e9914562..624a7eea 100644
--- a/LibGit2Sharp/Repository.cs
+++ b/LibGit2Sharp/Repository.cs
@@ -790,11 +790,23 @@ namespace LibGit2Sharp
/// </summary>
/// <param name="resetOptions">Flavor of reset operation to perform.</param>
/// <param name="commit">The target commit object.</param>
+ [Obsolete("This method will be removed in the next release. Please use Reset(ResetMode, Commit) instead.")]
public void Reset(ResetOptions resetOptions, Commit commit)
{
+ Reset((ResetMode)resetOptions, commit);
+ }
+
+ /// <summary>
+ /// Sets the current <see cref="Head"/> to the specified commit and optionally resets the <see cref="Index"/> and
+ /// the content of the working tree to match.
+ /// </summary>
+ /// <param name="resetMode">Flavor of reset operation to perform.</param>
+ /// <param name="commit">The target commit object.</param>
+ public void Reset(ResetMode resetMode, Commit commit)
+ {
Ensure.ArgumentNotNull(commit, "commit");
- Proxy.git_reset(handle, commit.Id, resetOptions);
+ Proxy.git_reset(handle, commit.Id, resetMode);
Refs.Log(Refs.Head).Append(commit.Id, string.Format("reset: moving to {0}", commit.Sha));
}