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:
authorKeith Dahlby <dahlbyk@gmail.com>2012-06-07 14:16:59 +0400
committerKeith Dahlby <dahlbyk@gmail.com>2012-06-10 01:16:24 +0400
commitcf348566ecfd9c82cb1ce78fa9b658ff40cededd (patch)
tree79e2c64d01ec0a9f85ec09f76309a7ec24ce1333 /LibGit2Sharp/BranchCollection.cs
parentfee0a889a8ff621a1393f71636a8f70bc6ee484f (diff)
Rename Create to Add in BranchCollection
Diffstat (limited to 'LibGit2Sharp/BranchCollection.cs')
-rw-r--r--LibGit2Sharp/BranchCollection.cs15
1 files changed, 14 insertions, 1 deletions
diff --git a/LibGit2Sharp/BranchCollection.cs b/LibGit2Sharp/BranchCollection.cs
index c69be0a2..6689afca 100644
--- a/LibGit2Sharp/BranchCollection.cs
+++ b/LibGit2Sharp/BranchCollection.cs
@@ -95,7 +95,7 @@ namespace LibGit2Sharp
/// <param name = "shaOrReferenceName">The target which can be sha or a canonical reference name.</param>
/// <param name = "allowOverwrite">True to allow silent overwriting a potentially existing branch, false otherwise.</param>
/// <returns></returns>
- public Branch Create(string name, string shaOrReferenceName, bool allowOverwrite = false)
+ public Branch Add(string name, string shaOrReferenceName, bool allowOverwrite = false)
{
Ensure.ArgumentNotNullOrEmptyString(name, "name");
@@ -111,6 +111,19 @@ namespace LibGit2Sharp
}
/// <summary>
+ /// Create a new local branch with the specified name
+ /// </summary>
+ /// <param name = "name">The name of the branch.</param>
+ /// <param name = "shaOrReferenceName">The target which can be sha or a canonical reference name.</param>
+ /// <param name = "allowOverwrite">True to allow silent overwriting a potentially existing branch, false otherwise.</param>
+ /// <returns></returns>
+ [Obsolete("This method will be removed in the next release. Please use Add() instead.")]
+ public Branch Create(string name, string shaOrReferenceName, bool allowOverwrite = false)
+ {
+ return Add(name, shaOrReferenceName, allowOverwrite);
+ }
+
+ /// <summary>
/// Deletes the branch with the specified name.
/// </summary>
/// <param name = "name">The name of the branch to delete.</param>