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:
authorBrendan Forster <brendan@github.com>2015-05-10 14:02:38 +0300
committernulltoken <emeric.fermas@gmail.com>2015-05-15 20:31:46 +0300
commit40bbf1e496b512537aa8a7928a2e133f21e7351c (patch)
tree04092d00ebb859f6e5c946901cf4935a41cc5dac
parentb3386c995f88d88b43b21788c20890de55bf795e (diff)
Drop optional parameters in BranchCollection.cs
-rw-r--r--LibGit2Sharp/BranchCollection.cs26
1 files changed, 24 insertions, 2 deletions
diff --git a/LibGit2Sharp/BranchCollection.cs b/LibGit2Sharp/BranchCollection.cs
index b4e617b2..42834d04 100644
--- a/LibGit2Sharp/BranchCollection.cs
+++ b/LibGit2Sharp/BranchCollection.cs
@@ -111,9 +111,20 @@ namespace LibGit2Sharp
/// </summary>
/// <param name="name">The name of the branch.</param>
/// <param name="committish">Revparse spec for the target commit.</param>
+ /// <returns>A new <see cref="Branch"/>.</returns>
+ public virtual Branch Add(string name, string committish)
+ {
+ return Add(name, committish, false);
+ }
+
+ /// <summary>
+ /// Create a new local branch with the specified name
+ /// </summary>
+ /// <param name="name">The name of the branch.</param>
+ /// <param name="committish">Revparse spec for the target commit.</param>
/// <param name="allowOverwrite">True to allow silent overwriting a potentially existing branch, false otherwise.</param>
/// <returns>A new <see cref="Branch"/>.</returns>
- public virtual Branch Add(string name, string committish, bool allowOverwrite = false)
+ public virtual Branch Add(string name, string committish, bool allowOverwrite)
{
Ensure.ArgumentNotNullOrEmptyString(name, "name");
Ensure.ArgumentNotNullOrEmptyString(committish, "committish");
@@ -143,9 +154,20 @@ namespace LibGit2Sharp
/// </summary>
/// <param name="branch">The current local branch.</param>
/// <param name="newName">The new name the existing branch should bear.</param>
+ /// <returns>A new <see cref="Branch"/>.</returns>
+ public virtual Branch Rename(Branch branch, string newName)
+ {
+ return Rename(branch, newName, false);
+ }
+
+ /// <summary>
+ /// Rename an existing local branch
+ /// </summary>
+ /// <param name="branch">The current local branch.</param>
+ /// <param name="newName">The new name the existing branch should bear.</param>
/// <param name="allowOverwrite">True to allow silent overwriting a potentially existing branch, false otherwise.</param>
/// <returns>A new <see cref="Branch"/>.</returns>
- public virtual Branch Rename(Branch branch, string newName, bool allowOverwrite = false)
+ public virtual Branch Rename(Branch branch, string newName, bool allowOverwrite)
{
Ensure.ArgumentNotNull(branch, "branch");
Ensure.ArgumentNotNullOrEmptyString(newName, "newName");