From a4d6d020c4e33109bf1f203869c91726a07629bb Mon Sep 17 00:00:00 2001 From: Stefan Haller Date: Mon, 3 Mar 2025 21:23:01 +0100 Subject: [PATCH] Remove unused functions For some reason the //nolint:golint,unused comment no longer seems to work after I updated gopls (I think). But I also don't understand why we mark unused stuff with linter comments instead of just getting rid of it. --- pkg/commands/git_commands/deps_test.go | 21 --------------------- 1 file changed, 21 deletions(-) diff --git a/pkg/commands/git_commands/deps_test.go b/pkg/commands/git_commands/deps_test.go index a7412bd38..78990a55e 100644 --- a/pkg/commands/git_commands/deps_test.go +++ b/pkg/commands/git_commands/deps_test.go @@ -7,7 +7,6 @@ import ( gogit "github.com/jesseduffield/go-git/v5" "github.com/jesseduffield/lazygit/pkg/commands/git_config" "github.com/jesseduffield/lazygit/pkg/commands/oscommands" - "github.com/jesseduffield/lazygit/pkg/commands/patch" "github.com/jesseduffield/lazygit/pkg/common" "github.com/jesseduffield/lazygit/pkg/config" "github.com/jesseduffield/lazygit/pkg/utils" @@ -126,26 +125,6 @@ func buildWorkingTreeCommands(deps commonDeps) *WorkingTreeCommands { return NewWorkingTreeCommands(gitCommon, submoduleCommands, fileLoader) } -func buildPatchCommands(deps commonDeps) *PatchCommands { //nolint:golint,unused - gitCommon := buildGitCommon(deps) - rebaseCommands := buildRebaseCommands(deps) - commitCommands := buildCommitCommands(deps) - statusCommands := buildStatusCommands(deps) - stashCommands := buildStashCommands(deps) - loadFileFn := func(from string, to string, reverse bool, filename string, plain bool) (string, error) { - return "", nil - } - patchBuilder := patch.NewPatchBuilder(gitCommon.Log, loadFileFn) - - return NewPatchCommands(gitCommon, rebaseCommands, commitCommands, statusCommands, stashCommands, patchBuilder) -} - -func buildStatusCommands(deps commonDeps) *StatusCommands { //nolint:golint,unused - gitCommon := buildGitCommon(deps) - - return NewStatusCommands(gitCommon) -} - func buildStashCommands(deps commonDeps) *StashCommands { gitCommon := buildGitCommon(deps) fileLoader := buildFileLoader(gitCommon)