mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-05-12 21:05:48 +02:00
Make WorkingTreeState a struct, and add cherry-picking and reverting states
This commit is contained in:
parent
8af8f7754b
commit
542525743c
17 changed files with 176 additions and 95 deletions
|
@ -228,7 +228,7 @@ func (self *PatchCommands) MovePatchIntoIndex(commits []*models.Commit, commitId
|
|||
}
|
||||
|
||||
if err := self.ApplyCustomPatch(true, true); err != nil {
|
||||
if self.status.WorkingTreeState() == models.WORKING_TREE_STATE_REBASING {
|
||||
if self.status.WorkingTreeState().Rebasing {
|
||||
_ = self.rebase.AbortRebase()
|
||||
}
|
||||
return err
|
||||
|
@ -252,7 +252,7 @@ func (self *PatchCommands) MovePatchIntoIndex(commits []*models.Commit, commitId
|
|||
self.rebase.onSuccessfulContinue = func() error {
|
||||
// add patches to index
|
||||
if err := self.ApplyPatch(patch, ApplyPatchOpts{Index: true, ThreeWay: true}); err != nil {
|
||||
if self.status.WorkingTreeState() == models.WORKING_TREE_STATE_REBASING {
|
||||
if self.status.WorkingTreeState().Rebasing {
|
||||
_ = self.rebase.AbortRebase()
|
||||
}
|
||||
return err
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue