mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-06-15 00:15:32 +02:00
Make WorkingTreeState a struct, and add cherry-picking and reverting states
This commit is contained in:
@ -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
|
||||
|
Reference in New Issue
Block a user