File tree Expand file tree Collapse file tree 2 files changed +7
-9
lines changed
Expand file tree Collapse file tree 2 files changed +7
-9
lines changed Original file line number Diff line number Diff line change @@ -66,7 +66,7 @@ private void PullButtonClick(object sender, EventArgs e)
6666 if ( PullRadioButton . Checked )
6767 {
6868 _settings . PullSetting = PullSetting . Pull ;
69- if ( ! _commands . StartGitTfsCommandProcessDialog ( "pull" ) )
69+ if ( ! _commands . StartGitTfsCommandProcessDialog ( "pull" , "--remote " + TfsRemoteComboBox . Text ) )
7070 {
7171 _commands . StartResolveConflictsDialog ( ) ;
7272 }
@@ -117,7 +117,7 @@ private void PushButtonClick(object sender, EventArgs e)
117117 if ( CheckinRadioButton . Checked )
118118 {
119119 _settings . PushSetting = PushSetting . Checkin ;
120- _commands . StartGitTfsCommandProcessDialog ( "checkintool" ) ;
120+ _commands . StartGitTfsCommandProcessDialog ( "checkintool" , "--remote " + TfsRemoteComboBox . Text ) ;
121121 }
122122 else if ( ShelveRadioButton . Checked )
123123 {
@@ -127,7 +127,7 @@ private void PushButtonClick(object sender, EventArgs e)
127127 else if ( RCheckinRadioButton . Checked )
128128 {
129129 _settings . PushSetting = PushSetting . RCheckin ;
130- _commands . StartGitTfsCommandProcessDialog ( "rcheckin" ) ;
130+ _commands . StartGitTfsCommandProcessDialog ( "rcheckin" , "--remote " + TfsRemoteComboBox . Text ) ;
131131 }
132132 this . Close ( ) ;
133133 }
Original file line number Diff line number Diff line change 1- using System ;
2- using System . Collections . Generic ;
1+ using System . Collections . Generic ;
32using System . Linq ;
43using System . Reflection ;
5- using System . Text ;
64using System . Text . RegularExpressions ;
75using System . Windows . Forms ;
86using GitUIPluginInterfaces ;
@@ -50,9 +48,9 @@ public bool Execute(GitUIBaseEventArgs gitUiCommands)
5048 private static IEnumerable < string > GetTfsRemotes ( IGitUICommands commands )
5149 {
5250 var result = commands . GitCommand ( "config --get-regexp tfs-remote" ) ;
53- var match = Regex . Match ( result , @"tfs-remote\.([^\.]+)" ) ;
54- return match . Success
55- ? match . Groups . Cast < Group > ( ) . Skip ( 1 ) . Select ( g => g . Value )
51+ var matches = Regex . Matches ( result , @"tfs-remote\.([^\.]+)" ) ;
52+ return matches . Count > 0
53+ ? matches . Cast < Match > ( ) . Select ( g => g . Groups [ 1 ] . Value ) . Distinct ( )
5654 : Enumerable . Empty < string > ( ) ;
5755 }
5856
You can’t perform that action at this time.
0 commit comments