summaryrefslogtreecommitdiffstats
path: root/pkg/commands/git_commands/patch.go
diff options
context:
space:
mode:
authorJesse Duffield <jessedduffield@gmail.com>2022-01-18 21:26:21 +1100
committerJesse Duffield <jessedduffield@gmail.com>2022-01-18 22:01:09 +1100
commit3e80a9e886007e11cc774b74a32959625e102750 (patch)
tree0388789b4929785542afcb9f3a6691db0873180f /pkg/commands/git_commands/patch.go
parent9706416a4171b9fce72d404ef38e2988b894c554 (diff)
refactor to group up more commonly used git command stuff
Diffstat (limited to 'pkg/commands/git_commands/patch.go')
-rw-r--r--pkg/commands/git_commands/patch.go38
1 files changed, 16 insertions, 22 deletions
diff --git a/pkg/commands/git_commands/patch.go b/pkg/commands/git_commands/patch.go
index 64661cd71..8f9ce5784 100644
--- a/pkg/commands/git_commands/patch.go
+++ b/pkg/commands/git_commands/patch.go
@@ -5,40 +5,34 @@ import (
"github.com/go-errors/errors"
"github.com/jesseduffield/lazygit/pkg/commands/models"
- "github.com/jesseduffield/lazygit/pkg/commands/oscommands"
"github.com/jesseduffield/lazygit/pkg/commands/patch"
"github.com/jesseduffield/lazygit/pkg/commands/types/enums"
- "github.com/jesseduffield/lazygit/pkg/common"
)
type PatchCommands struct {
- *common.Common
-
- cmd oscommands.ICmdObjBuilder
- rebase *RebaseCommands
- commit *CommitCommands
- config *ConfigCommands
- stash *StashCommands
- status *StatusCommands
+ *GitCommon
+ rebase *RebaseCommands
+ commit *CommitCommands
+ status *StatusCommands
+ stash *StashCommands
+
PatchManager *patch.PatchManager
}
func NewPatchCommands(
- common *common.Common,
- cmd oscommands.ICmdObjBuilder,
- rebaseCommands *RebaseCommands,
- commitCommands *CommitCommands,
- configCommands *ConfigCommands,
- statusCommands *StatusCommands,
+ gitCommon *GitCommon,
+ rebase *RebaseCommands,
+ commit *CommitCommands,
+ status *StatusCommands,
+ stash *StashCommands,
patchManager *patch.PatchManager,
) *PatchCommands {
return &PatchCommands{
- Common: common,
- cmd: cmd,
- rebase: rebaseCommands,
- commit: commitCommands,
- config: configCommands,
- status: statusCommands,
+ GitCommon: gitCommon,
+ rebase: rebase,
+ commit: commit,
+ status: status,
+ stash: stash,
PatchManager: patchManager,
}
}