diff options
author | AzraelSec <federicogerardi94@gmail.com> | 2023-03-29 00:53:14 +0200 |
---|---|---|
committer | Jesse Duffield <jessedduffield@gmail.com> | 2023-04-15 17:26:08 +1000 |
commit | a3fdf91714c460f0496627e48a86a697107f40fb (patch) | |
tree | 1c94bd6cd475e160543880bb9a5e8459e950d83a /pkg/commands | |
parent | 368f9c8cb3d1f86d2a854cdfc20a8c87221e4087 (diff) |
feat: allow to perform a rebase with breaking before the first commit
Diffstat (limited to 'pkg/commands')
-rw-r--r-- | pkg/commands/git_commands/rebase.go | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/pkg/commands/git_commands/rebase.go b/pkg/commands/git_commands/rebase.go index 4e4892d8d..18072779e 100644 --- a/pkg/commands/git_commands/rebase.go +++ b/pkg/commands/git_commands/rebase.go @@ -126,6 +126,11 @@ func (self *RebaseCommands) InteractiveRebaseBreakAfter(commits []*models.Commit return self.PrepareInteractiveRebaseCommand(sha, todo, true, false).Run() } +func (self *RebaseCommands) EditRebase(branchRef string) error { + commands := []TodoLine{{Action: "break"}} + return self.PrepareInteractiveRebaseCommand(branchRef, commands, false, true).Run() +} + // PrepareInteractiveRebaseCommand returns the cmd for an interactive rebase // we tell git to run lazygit to edit the todo list, and we pass the client // lazygit a todo string to write to the todo file |