mirror of
https://github.com/sourcegit-scm/sourcegit
synced 2025-05-24 21:54: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,6 +1,4 @@
|
|||
using System.Diagnostics;
|
||||
|
||||
namespace SourceGit.Commands
|
||||
namespace SourceGit.Commands
|
||||
{
|
||||
public class Rebase : Command
|
||||
{
|
||||
|
@ -19,12 +17,10 @@ namespace SourceGit.Commands
|
|||
{
|
||||
public InteractiveRebase(string repo, string basedOn)
|
||||
{
|
||||
var exec = Process.GetCurrentProcess().MainModule.FileName;
|
||||
var editor = $"\\\"{exec}\\\" --rebase-editor";
|
||||
|
||||
WorkingDirectory = repo;
|
||||
Context = repo;
|
||||
Args = $"-c core.editor=\"{editor}\" -c sequence.editor=\"{editor}\" -c rebase.abbreviateCommands=true rebase -i --autosquash {basedOn}";
|
||||
Editor = EditorType.RebaseEditor;
|
||||
Args = $"rebase -i --autosquash {basedOn}";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue