@@ -26,7 +26,6 @@ public Models.Branch SelectedLocalBranch
26
26
public List < Models . Branch > LocalBranches
27
27
{
28
28
get ;
29
- private set ;
30
29
}
31
30
32
31
public List < Models . Remote > Remotes
@@ -157,7 +156,7 @@ public override Task<bool> Sure()
157
156
{
158
157
_repo . SetWatcherEnabled ( false ) ;
159
158
160
- var remoteBranchName = _selectedRemoteBranch . Name . Replace ( " (new)" , "" ) ;
159
+ var remoteBranchName = _selectedRemoteBranch . Name ;
161
160
ProgressDescription = $ "Push { _selectedLocalBranch . Name } -> { _selectedRemote . Name } /{ remoteBranchName } ...";
162
161
163
162
return Task . Run ( ( ) =>
@@ -187,7 +186,7 @@ private void AutoSelectBranchByRemote()
187
186
branches . Add ( branch ) ;
188
187
}
189
188
190
- // If selected local branch has upstream branch . Try to find it in current remote branches.
189
+ // If selected local branch has upstream. Try to find it in current remote branches.
191
190
if ( ! string . IsNullOrEmpty ( _selectedLocalBranch . Upstream ) )
192
191
{
193
192
foreach ( var branch in branches )
@@ -201,7 +200,7 @@ private void AutoSelectBranchByRemote()
201
200
}
202
201
}
203
202
204
- // Find best remote branch by name.
203
+ // Try to find a remote branch with the same name of selected local branch .
205
204
foreach ( var branch in branches )
206
205
{
207
206
if ( _selectedLocalBranch . Name == branch . Name )
@@ -215,7 +214,7 @@ private void AutoSelectBranchByRemote()
215
214
// Add a fake new branch.
216
215
var fake = new Models . Branch ( )
217
216
{
218
- Name = $ " { _selectedLocalBranch . Name } (new)" ,
217
+ Name = _selectedLocalBranch . Name ,
219
218
Remote = _selectedRemote . Name ,
220
219
} ;
221
220
branches . Add ( fake ) ;
@@ -226,7 +225,7 @@ private void AutoSelectBranchByRemote()
226
225
private readonly Repository _repo = null ;
227
226
private Models . Branch _selectedLocalBranch = null ;
228
227
private Models . Remote _selectedRemote = null ;
229
- private List < Models . Branch > _remoteBranches = new List < Models . Branch > ( ) ;
228
+ private List < Models . Branch > _remoteBranches = [ ] ;
230
229
private Models . Branch _selectedRemoteBranch = null ;
231
230
private bool _isSetTrackOptionVisible = false ;
232
231
}
0 commit comments