mirror of
https://github.com/sourcegit-scm/sourcegit
synced 2025-05-23 13:14:59 +00:00
refactor: rewrite external editor supports
* supported editors can be different on different platforms. * display founded editors only
This commit is contained in:
parent
bcb83af576
commit
111bf2966a
20 changed files with 417 additions and 220 deletions
|
@ -32,7 +32,7 @@ namespace SourceGit.Commands
|
|||
public bool Exec()
|
||||
{
|
||||
var start = new ProcessStartInfo();
|
||||
start.FileName = Native.OS.GitInstallPath;
|
||||
start.FileName = Native.OS.GitExecutable;
|
||||
start.Arguments = "--no-pager -c core.quotepath=off " + Args;
|
||||
start.UseShellExecute = false;
|
||||
start.CreateNoWindow = true;
|
||||
|
@ -144,7 +144,7 @@ namespace SourceGit.Commands
|
|||
public ReadToEndResult ReadToEnd()
|
||||
{
|
||||
var start = new ProcessStartInfo();
|
||||
start.FileName = Native.OS.GitInstallPath;
|
||||
start.FileName = Native.OS.GitExecutable;
|
||||
start.Arguments = "--no-pager -c core.quotepath=off " + Args;
|
||||
start.UseShellExecute = false;
|
||||
start.CreateNoWindow = true;
|
||||
|
|
|
@ -12,7 +12,7 @@ namespace SourceGit.Commands
|
|||
{
|
||||
var starter = new ProcessStartInfo();
|
||||
starter.WorkingDirectory = repo;
|
||||
starter.FileName = Native.OS.GitInstallPath;
|
||||
starter.FileName = Native.OS.GitExecutable;
|
||||
starter.Arguments = $"show {revision}:\"{file}\"";
|
||||
starter.UseShellExecute = false;
|
||||
starter.CreateNoWindow = true;
|
||||
|
|
|
@ -27,7 +27,7 @@ namespace SourceGit.Commands
|
|||
{
|
||||
var starter = new ProcessStartInfo();
|
||||
starter.WorkingDirectory = repo;
|
||||
starter.FileName = Native.OS.GitInstallPath;
|
||||
starter.FileName = Native.OS.GitExecutable;
|
||||
starter.Arguments = $"diff --ignore-cr-at-eol --unified=4 {opt}";
|
||||
starter.UseShellExecute = false;
|
||||
starter.CreateNoWindow = true;
|
||||
|
|
|
@ -30,7 +30,7 @@ namespace SourceGit.Commands
|
|||
{
|
||||
var starter = new ProcessStartInfo();
|
||||
starter.WorkingDirectory = repo;
|
||||
starter.FileName = Native.OS.GitInstallPath;
|
||||
starter.FileName = Native.OS.GitExecutable;
|
||||
starter.Arguments = args;
|
||||
starter.UseShellExecute = false;
|
||||
starter.CreateNoWindow = true;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue