diff options
author | Jesse Duffield <jessedduffield@gmail.com> | 2020-09-29 18:36:54 +1000 |
---|---|---|
committer | Jesse Duffield <jessedduffield@gmail.com> | 2020-09-29 20:48:49 +1000 |
commit | 630e4469898cb630c93cd309156c7c90bf2acd75 (patch) | |
tree | 553d9ac059b8d75190821db9c053d8c12f4f02e6 /pkg/commands/patch_rebases.go | |
parent | 44248d9ab0818dfca6a5c1f5ee2ad5b0d45d4998 (diff) |
move commits model into models package
Diffstat (limited to 'pkg/commands/patch_rebases.go')
-rw-r--r-- | pkg/commands/patch_rebases.go | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/pkg/commands/patch_rebases.go b/pkg/commands/patch_rebases.go index f4d411514..6d032b446 100644 --- a/pkg/commands/patch_rebases.go +++ b/pkg/commands/patch_rebases.go @@ -5,10 +5,11 @@ import ( "github.com/go-errors/errors" "github.com/jesseduffield/lazygit/pkg/commands/patch" + "github.com/jesseduffield/lazygit/pkg/models" ) // DeletePatchesFromCommit applies a patch in reverse for a commit -func (c *GitCommand) DeletePatchesFromCommit(commits []*Commit, commitIndex int, p *patch.PatchManager) error { +func (c *GitCommand) DeletePatchesFromCommit(commits []*models.Commit, commitIndex int, p *patch.PatchManager) error { if err := c.BeginInteractiveRebaseForCommit(commits, commitIndex); err != nil { return err } @@ -35,7 +36,7 @@ func (c *GitCommand) DeletePatchesFromCommit(commits []*Commit, commitIndex int, return c.GenericMerge("rebase", "continue") } -func (c *GitCommand) MovePatchToSelectedCommit(commits []*Commit, sourceCommitIdx int, destinationCommitIdx int, p *patch.PatchManager) error { +func (c *GitCommand) MovePatchToSelectedCommit(commits []*models.Commit, sourceCommitIdx int, destinationCommitIdx int, p *patch.PatchManager) error { if sourceCommitIdx < destinationCommitIdx { if err := c.BeginInteractiveRebaseForCommit(commits, destinationCommitIdx); err != nil { return err @@ -136,7 +137,7 @@ func (c *GitCommand) MovePatchToSelectedCommit(commits []*Commit, sourceCommitId return c.GenericMerge("rebase", "continue") } -func (c *GitCommand) PullPatchIntoIndex(commits []*Commit, commitIdx int, p *patch.PatchManager, stash bool) error { +func (c *GitCommand) PullPatchIntoIndex(commits []*models.Commit, commitIdx int, p *patch.PatchManager, stash bool) error { if stash { if err := c.StashSave(c.Tr.SLocalize("StashPrefix") + commits[commitIdx].Sha); err != nil { return err @@ -189,7 +190,7 @@ func (c *GitCommand) PullPatchIntoIndex(commits []*Commit, commitIdx int, p *pat return c.GenericMerge("rebase", "continue") } -func (c *GitCommand) PullPatchIntoNewCommit(commits []*Commit, commitIdx int, p *patch.PatchManager) error { +func (c *GitCommand) PullPatchIntoNewCommit(commits []*models.Commit, commitIdx int, p *patch.PatchManager) error { if err := c.BeginInteractiveRebaseForCommit(commits, commitIdx); err != nil { return err } |