File tree Expand file tree Collapse file tree 2 files changed +13
-16
lines changed Expand file tree Collapse file tree 2 files changed +13
-16
lines changed Original file line number Diff line number Diff line change @@ -37,19 +37,6 @@ public enum EditorType
37
37
public bool RaiseError { get ; set ; } = true ;
38
38
public Models . ICommandLog Log { get ; set ; } = null ;
39
39
40
- public void Exec ( )
41
- {
42
- try
43
- {
44
- var start = CreateGitStartInfo ( false ) ;
45
- Process . Start ( start ) ;
46
- }
47
- catch ( Exception ex )
48
- {
49
- App . RaiseException ( Context , ex . Message ) ;
50
- }
51
- }
52
-
53
40
public async Task < bool > ExecAsync ( )
54
41
{
55
42
Log ? . AppendLine ( $ "$ git { Args } \n ") ;
@@ -171,7 +158,7 @@ protected async Task<Result> ReadToEndAsync()
171
158
return rs ;
172
159
}
173
160
174
- private ProcessStartInfo CreateGitStartInfo ( bool redirect )
161
+ protected ProcessStartInfo CreateGitStartInfo ( bool redirect )
175
162
{
176
163
var start = new ProcessStartInfo ( ) ;
177
164
start . FileName = Native . OS . GitExecutable ;
Original file line number Diff line number Diff line change 1
- namespace SourceGit . Commands
1
+ using System ;
2
+ using System . Diagnostics ;
3
+
4
+ namespace SourceGit . Commands
2
5
{
3
6
public class DiffTool : Command
4
7
{
@@ -28,7 +31,14 @@ public void Open()
28
31
Args = $ "-c difftool.sourcegit.cmd={ cmd . Quoted ( ) } difftool --tool=sourcegit --no-prompt { _option } ";
29
32
}
30
33
31
- Exec ( ) ;
34
+ try
35
+ {
36
+ Process . Start ( CreateGitStartInfo ( false ) ) ;
37
+ }
38
+ catch ( Exception ex )
39
+ {
40
+ App . RaiseException ( Context , ex . Message ) ;
41
+ }
32
42
}
33
43
34
44
private Models . DiffOption _option ;
You can’t perform that action at this time.
0 commit comments