@@ -110,90 +110,6 @@ public void Run(bool firstRun)
110
110
} ) ) ;
111
111
}
112
112
113
- private ITask SetupGit ( )
114
- {
115
- return BuildDetermineGitPathTask ( )
116
- . Then ( ( b , path ) => {
117
- Logger . Trace ( "Setting GitExecutablePath: {0}" , path ) ;
118
- Environment . GitExecutablePath = path ;
119
- } )
120
- . Then ( ( ) => {
121
- if ( Environment . GitExecutablePath == null )
122
- {
123
- if ( Environment . IsWindows )
124
- {
125
- GitClient . GetConfig ( "credential.helper" , GitConfigSource . Global ) . Then (
126
- ( b , credentialHelper ) => {
127
- if ( ! string . IsNullOrEmpty ( credentialHelper ) )
128
- {
129
- Logger . Trace ( "Windows CredentialHelper: {0}" , credentialHelper ) ;
130
- }
131
- else
132
- {
133
- Logger . Warning (
134
- "No Windows CredentialHeloper found: Setting to wincred" ) ;
135
-
136
- GitClient . SetConfig ( "credential.helper" , "wincred" , GitConfigSource . Global ) . Start ( ) . Wait ( ) ;
137
- }
138
- } ) ;
139
- }
140
- }
141
- } )
142
- . ThenInUI ( ( ) => {
143
- Environment . User . Initialize ( GitClient ) ;
144
- } ) ;
145
- }
146
-
147
- private TaskBase < NPath > BuildDetermineGitPathTask ( )
148
- {
149
- TaskBase < NPath > determinePath = new FuncTask < NPath > ( CancellationToken , ( ) => {
150
- if ( Environment . GitExecutablePath != null )
151
- {
152
- return Environment . GitExecutablePath ;
153
- }
154
-
155
- var gitExecutablePath = SystemSettings . Get ( Constants . GitInstallPathKey ) ? . ToNPath ( ) ;
156
- if ( gitExecutablePath != null && gitExecutablePath . FileExists ( ) )
157
- {
158
- Logger . Trace ( "Using git install path from settings" ) ;
159
- return gitExecutablePath ;
160
- }
161
-
162
- return null ;
163
- } ) ;
164
-
165
- var environmentIsWindows = Environment . IsWindows ;
166
- if ( environmentIsWindows )
167
- {
168
- var applicationDataPath = Environment . GetSpecialFolder ( System . Environment . SpecialFolder . LocalApplicationData ) . ToNPath ( ) ;
169
- var installDetails = new GitInstallDetails ( applicationDataPath , true ) ;
170
- var installTask = new PortableGitInstallTask ( CancellationToken , Environment , installDetails ) ;
171
-
172
- determinePath = determinePath . Then ( new ShortCircuitTask < NPath > ( CancellationToken , installTask ) ) ;
173
- }
174
-
175
- if ( ! environmentIsWindows )
176
- {
177
- determinePath = determinePath . Then ( new ShortCircuitTask < NPath > ( CancellationToken , ( ) => {
178
- var p = new NPath ( "/usr/local/bin/git" ) ;
179
-
180
- if ( p . FileExists ( ) )
181
- {
182
- return p ;
183
- }
184
-
185
- return null ;
186
- } ) ) ;
187
-
188
- var findExecTask = new FindExecTask ( "git" , CancellationToken ) ;
189
- findExecTask . Configure ( ProcessManager ) ;
190
-
191
- determinePath = determinePath . Then ( new ShortCircuitTask < NPath > ( CancellationToken , findExecTask ) ) ;
192
- }
193
-
194
- return determinePath ;
195
- }
196
-
197
113
public ITask InitializeRepository ( )
198
114
{
199
115
Logger . Trace ( "Running Repository Initialize" ) ;
0 commit comments