diff options
Diffstat (limited to 'LibGit2Sharp/RemoteCollection.cs')
-rw-r--r-- | LibGit2Sharp/RemoteCollection.cs | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/LibGit2Sharp/RemoteCollection.cs b/LibGit2Sharp/RemoteCollection.cs index b0eb584a..d504ca3c 100644 --- a/LibGit2Sharp/RemoteCollection.cs +++ b/LibGit2Sharp/RemoteCollection.cs @@ -145,9 +145,20 @@ namespace LibGit2Sharp /// </summary> /// <param name="name">The current remote name.</param> /// <param name="newName">The new name the existing remote should bear.</param> + /// <returns>A new <see cref="Remote"/>.</returns> + public virtual Remote Rename(string name, string newName) + { + return Rename(name, newName, null); + } + + /// <summary> + /// Renames an existing <see cref="Remote"/>. + /// </summary> + /// <param name="name">The current remote name.</param> + /// <param name="newName">The new name the existing remote should bear.</param> /// <param name="callback">The callback to be used when problems with renaming occur. (e.g. non-default fetch refspecs)</param> /// <returns>A new <see cref="Remote"/>.</returns> - public virtual Remote Rename(string name, string newName, RemoteRenameFailureHandler callback = null) + public virtual Remote Rename(string name, string newName, RemoteRenameFailureHandler callback) { Ensure.ArgumentNotNull(name, "name"); Ensure.ArgumentNotNull(newName, "newName"); |