summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJesse Duffield <jessedduffield@gmail.com>2019-11-05 11:56:29 +1100
committerJesse Duffield <jessedduffield@gmail.com>2019-11-05 19:22:01 +1100
commit733145d13271affa666790ac394a43f43d698850 (patch)
treeef34263e224bd24c53401c28e0cd8aa3a1e100f3
parentf285d80d0ef17860d9180759f756140fb40d967f (diff)
clear patch after successful patch operation
-rw-r--r--pkg/commands/patch_rebases.go16
1 files changed, 16 insertions, 0 deletions
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
}