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
3737 public bool RaiseError { get ; set ; } = true ;
3838 public Models . ICommandLog Log { get ; set ; } = null ;
3939
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-
5340 public async Task < bool > ExecAsync ( )
5441 {
5542 Log ? . AppendLine ( $ "$ git { Args } \n ") ;
@@ -171,7 +158,7 @@ protected async Task<Result> ReadToEndAsync()
171158 return rs ;
172159 }
173160
174- private ProcessStartInfo CreateGitStartInfo ( bool redirect )
161+ protected ProcessStartInfo CreateGitStartInfo ( bool redirect )
175162 {
176163 var start = new ProcessStartInfo ( ) ;
177164 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
25{
36 public class DiffTool : Command
47 {
@@ -28,7 +31,14 @@ public void Open()
2831 Args = $ "-c difftool.sourcegit.cmd={ cmd . Quoted ( ) } difftool --tool=sourcegit --no-prompt { _option } ";
2932 }
3033
31- Exec ( ) ;
34+ try
35+ {
36+ Process . Start ( CreateGitStartInfo ( false ) ) ;
37+ }
38+ catch ( Exception ex )
39+ {
40+ App . RaiseException ( Context , ex . Message ) ;
41+ }
3242 }
3343
3444 private Models . DiffOption _option ;
You can’t perform that action at this time.
0 commit comments