mirror of
https://github.com/sourcegit-scm/sourcegit
synced 2025-05-22 04:34:59 +00:00
refactor: commandline parsing
* `--rebase-todo-editor` launches this app as a git `sequence.editor` * `--rebase-message-editor` launches this app as a git `core.editor` which runs on background by reading rebasing jobs * `--core-editor` launches this app as a git `core.editor` * `--askpass` launches this app as a SSH askpass program
This commit is contained in:
parent
cbe4c36525
commit
6930b51c64
14 changed files with 320 additions and 155 deletions
|
@ -1,5 +1,4 @@
|
|||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
using System.IO;
|
||||
|
||||
namespace SourceGit.ViewModels
|
||||
{
|
||||
|
@ -39,7 +38,8 @@ namespace SourceGit.ViewModels
|
|||
{
|
||||
WorkingDirectory = Repository,
|
||||
Context = Repository,
|
||||
Args = $"-c core.editor=true {Cmd} --continue",
|
||||
Editor = Commands.Command.EditorType.None,
|
||||
Args = $"{Cmd} --continue",
|
||||
}.Exec();
|
||||
}
|
||||
}
|
||||
|
@ -58,14 +58,12 @@ namespace SourceGit.ViewModels
|
|||
|
||||
public override bool Continue()
|
||||
{
|
||||
var exec = Process.GetCurrentProcess().MainModule.FileName;
|
||||
var editor = $"\\\"{exec}\\\" --rebase-editor";
|
||||
|
||||
var succ = new Commands.Command()
|
||||
{
|
||||
WorkingDirectory = Repository,
|
||||
Context = Repository,
|
||||
Args = $"-c core.editor=\"{editor}\" rebase --continue",
|
||||
Editor = Commands.Command.EditorType.RebaseEditor,
|
||||
Args = $"rebase --continue",
|
||||
}.Exec();
|
||||
|
||||
if (succ)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue