@@ -25,21 +25,19 @@ public static void Push(
25
25
PushStatusErrorHandler onPushStatusError = null ,
26
26
PushOptions pushOptions = null )
27
27
{
28
- network . Push ( new [ ] { branch } , onPushStatusError , pushOptions ) ;
28
+ network . Push ( new [ ] { branch } , pushOptions ) ;
29
29
}
30
30
31
31
/// <summary>
32
32
/// Push the specified branches to their tracked branches on the remote.
33
33
/// </summary>
34
34
/// <param name="network">The <see cref="Network"/> being worked with.</param>
35
35
/// <param name="branches">The branches to push.</param>
36
- /// <param name="onPushStatusError">Handler for reporting failed push updates.</param>
37
36
/// <param name="pushOptions"><see cref="PushOptions"/> controlling push behavior</param>
38
37
/// <exception cref="LibGit2SharpException">Throws if either the Remote or the UpstreamBranchCanonicalName is not set.</exception>
39
38
public static void Push (
40
39
this Network network ,
41
40
IEnumerable < Branch > branches ,
42
- PushStatusErrorHandler onPushStatusError = null ,
43
41
PushOptions pushOptions = null )
44
42
{
45
43
var enumeratedBranches = branches as IList < Branch > ?? branches . ToList ( ) ;
@@ -55,80 +53,8 @@ public static void Push(
55
53
56
54
foreach ( var branch in enumeratedBranches )
57
55
{
58
- network . Push ( branch . Remote , string . Format ( "{0}:{1}" , branch . CanonicalName , branch . UpstreamBranchCanonicalName ) , onPushStatusError , pushOptions ) ;
56
+ network . Push ( branch . Remote , string . Format ( "{0}:{1}" , branch . CanonicalName , branch . UpstreamBranchCanonicalName ) , pushOptions ) ;
59
57
}
60
58
}
61
-
62
- /// <summary>
63
- /// Push the objectish to the destination reference on the <see cref="Remote"/>.
64
- /// </summary>
65
- /// <param name="network">The <see cref="Network"/> being worked with.</param>
66
- /// <param name="remote">The <see cref="Remote"/> to push to.</param>
67
- /// <param name="objectish">The source objectish to push.</param>
68
- /// <param name="destinationSpec">The reference to update on the remote.</param>
69
- /// <param name="pushOptions"><see cref="PushOptions"/> controlling push behavior</param>
70
- /// <returns>Results of the push operation.</returns>
71
- public static PushResult Push (
72
- this Network network ,
73
- Remote remote ,
74
- string objectish ,
75
- string destinationSpec ,
76
- PushOptions pushOptions = null )
77
- {
78
- Ensure . ArgumentNotNull ( remote , "remote" ) ;
79
- Ensure . ArgumentNotNull ( objectish , "objectish" ) ;
80
- Ensure . ArgumentNotNullOrEmptyString ( destinationSpec , "destinationSpec" ) ;
81
-
82
- return network . Push ( remote , string . Format ( CultureInfo . InvariantCulture ,
83
- "{0}:{1}" , objectish , destinationSpec ) , pushOptions ) ;
84
- }
85
-
86
- /// <summary>
87
- /// Push specified reference to the <see cref="Remote"/>.
88
- /// </summary>
89
- /// <param name="network">The <see cref="Network"/> being worked with.</param>
90
- /// <param name="remote">The <see cref="Remote"/> to push to.</param>
91
- /// <param name="pushRefSpec">The pushRefSpec to push.</param>
92
- /// <param name="pushOptions"><see cref="PushOptions"/> controlling push behavior</param>
93
- /// <returns>Results of the push operation.</returns>
94
- public static PushResult Push (
95
- this Network network ,
96
- Remote remote ,
97
- string pushRefSpec ,
98
- PushOptions pushOptions = null )
99
- {
100
- Ensure . ArgumentNotNull ( remote , "remote" ) ;
101
- Ensure . ArgumentNotNullOrEmptyString ( pushRefSpec , "pushRefSpec" ) ;
102
-
103
- return network . Push ( remote , new string [ ] { pushRefSpec } , pushOptions ) ;
104
- }
105
-
106
- /// <summary>
107
- /// Push specified references to the <see cref="Remote"/>.
108
- /// </summary>
109
- /// <param name="network">The <see cref="Network"/> being worked with.</param>
110
- /// <param name="remote">The <see cref="Remote"/> to push to.</param>
111
- /// <param name="pushRefSpecs">The pushRefSpecs to push.</param>
112
- /// <param name="pushOptions"><see cref="PushOptions"/> controlling push behavior</param>
113
- /// <returns>Results of the push operation.</returns>
114
- public static PushResult Push (
115
- this Network network ,
116
- Remote remote ,
117
- IEnumerable < string > pushRefSpecs ,
118
- PushOptions pushOptions = null )
119
- {
120
- Ensure . ArgumentNotNull ( remote , "remote" ) ;
121
- Ensure . ArgumentNotNull ( pushRefSpecs , "pushRefSpecs" ) ;
122
-
123
- var failedRemoteUpdates = new List < PushStatusError > ( ) ;
124
-
125
- network . Push (
126
- remote ,
127
- pushRefSpecs ,
128
- failedRemoteUpdates . Add ,
129
- pushOptions ) ;
130
-
131
- return new PushResult ( failedRemoteUpdates ) ;
132
- }
133
59
}
134
60
}
0 commit comments