From 631b36c995813aa90d790d8f40e342681f443112 Mon Sep 17 00:00:00 2001 From: Brendan Forster Date: Sun, 10 May 2015 12:56:45 +0200 Subject: Drop optional parameters in NetworkExtensions.cs --- LibGit2Sharp/NetworkExtensions.cs | 29 +++++++++++++++++++++++++++-- 1 file changed, 27 insertions(+), 2 deletions(-) diff --git a/LibGit2Sharp/NetworkExtensions.cs b/LibGit2Sharp/NetworkExtensions.cs index cf769c95..4efc53f0 100644 --- a/LibGit2Sharp/NetworkExtensions.cs +++ b/LibGit2Sharp/NetworkExtensions.cs @@ -9,6 +9,18 @@ namespace LibGit2Sharp /// public static class NetworkExtensions { + /// + /// Push the specified branch to its tracked branch on the remote. + /// + /// The being worked with. + /// The branch to push. + /// Throws if either the Remote or the UpstreamBranchCanonicalName is not set. + public static void Push( + this Network network, + Branch branch) + { + network.Push(new[] { branch }); + } /// /// Push the specified branch to its tracked branch on the remote. /// @@ -19,11 +31,24 @@ namespace LibGit2Sharp public static void Push( this Network network, Branch branch, - PushOptions pushOptions = null) + PushOptions pushOptions) { network.Push(new[] { branch }, pushOptions); } + /// + /// Push the specified branches to their tracked branches on the remote. + /// + /// The being worked with. + /// The branches to push. + /// Throws if either the Remote or the UpstreamBranchCanonicalName is not set. + public static void Push( + this Network network, + IEnumerable branches) + { + network.Push(branches, null); + } + /// /// Push the specified branches to their tracked branches on the remote. /// @@ -34,7 +59,7 @@ namespace LibGit2Sharp public static void Push( this Network network, IEnumerable branches, - PushOptions pushOptions = null) + PushOptions pushOptions) { var enumeratedBranches = branches as IList ?? branches.ToList(); -- cgit v1.2.3