From 733145d13271affa666790ac394a43f43d698850 Mon Sep 17 00:00:00 2001 From: Jesse Duffield Date: Tue, 5 Nov 2019 11:56:29 +1100 Subject: [PATCH] clear patch after successful patch operation --- pkg/commands/patch_rebases.go | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/pkg/commands/patch_rebases.go b/pkg/commands/patch_rebases.go index 40c3358ac..f0dadbc16 100644 --- a/pkg/commands/patch_rebases.go +++ b/pkg/commands/patch_rebases.go @@ -21,6 +21,11 @@ func (c *GitCommand) DeletePatchesFromCommit(commits []*Commit, commitIndex int, return err } + c.onSuccessfulContinue = func() error { + c.PatchManager = nil + return nil + } + // continue return c.GenericMerge("rebase", "continue") } @@ -44,6 +49,11 @@ func (c *GitCommand) MovePatchToSelectedCommit(commits []*Commit, sourceCommitId return err } + c.onSuccessfulContinue = func() error { + c.PatchManager = nil + return nil + } + // continue return c.GenericMerge("rebase", "continue") } @@ -110,6 +120,11 @@ func (c *GitCommand) MovePatchToSelectedCommit(commits []*Commit, sourceCommitId return err } + c.onSuccessfulContinue = func() error { + c.PatchManager = nil + return nil + } + return c.GenericMerge("rebase", "continue") } @@ -146,6 +161,7 @@ func (c *GitCommand) PullPatchIntoIndex(commits []*Commit, commitIdx int, p *Pat return err } + c.PatchManager = nil return nil }