sourcegit/src/Commands/Rebase.cs
leo 6930b51c64
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
2024-07-09 12:20:52 +08:00

26 lines
667 B
C#

namespace SourceGit.Commands
{
public class Rebase : Command
{
public Rebase(string repo, string basedOn, bool autoStash)
{
WorkingDirectory = repo;
Context = repo;
Args = "rebase ";
if (autoStash)
Args += "--autostash ";
Args += basedOn;
}
}
public class InteractiveRebase : Command
{
public InteractiveRebase(string repo, string basedOn)
{
WorkingDirectory = repo;
Context = repo;
Editor = EditorType.RebaseEditor;
Args = $"rebase -i --autosquash {basedOn}";
}
}
}