summaryrefslogtreecommitdiffstats
path: root/pkg/commands/git_commands/commit_test.go
diff options
context:
space:
mode:
authorScott Callaway <scott.callaway@uipath.com>2023-05-23 14:55:57 +0100
committerStefan Haller <stefan@haller-berlin.de>2023-07-14 07:56:09 +0200
commit96177373523f2fce6c34b5128c344afdf9be1b5a (patch)
treee6a6bff6d20143c5c1ae1e4b1bb2ee7878c25d90 /pkg/commands/git_commands/commit_test.go
parenta251f6ad6c7ac6ec4625a248d518953af105cb6f (diff)
config: rely on .gitconfig for verbose commit messages
As discussed in https://github.com/jesseduffield/lazygit/pull/2599, it makes more sense to have the user specify whether they want verbose commits from their own git config, rather than lazygit config. This means that we can remove all the code (including test coverage) associated with the custom verbose flag, and lazygit will just inherit the .gitconfig settings automatically.
Diffstat (limited to 'pkg/commands/git_commands/commit_test.go')
-rw-r--r--pkg/commands/git_commands/commit_test.go22
1 files changed, 0 insertions, 22 deletions
diff --git a/pkg/commands/git_commands/commit_test.go b/pkg/commands/git_commands/commit_test.go
index 54d4cbbd1..235a72465 100644
--- a/pkg/commands/git_commands/commit_test.go
+++ b/pkg/commands/git_commands/commit_test.go
@@ -114,7 +114,6 @@ func TestCommitCommitEditorCmdObj(t *testing.T) {
type scenario struct {
testName string
configSignoff bool
- configVerbose string
expected []string
}
@@ -122,33 +121,13 @@ func TestCommitCommitEditorCmdObj(t *testing.T) {
{
testName: "Commit using editor",
configSignoff: false,
- configVerbose: "default",
expected: []string{"commit"},
},
{
- testName: "Commit with --no-verbose flag",
- configSignoff: false,
- configVerbose: "never",
- expected: []string{"commit", "--no-verbose"},
- },
- {
- testName: "Commit with --verbose flag",
- configSignoff: false,
- configVerbose: "always",
- expected: []string{"commit", "--verbose"},
- },
- {
testName: "Commit with --signoff",
configSignoff: true,
- configVerbose: "default",
expected: []string{"commit", "--signoff"},
},
- {
- testName: "Commit with --signoff and --no-verbose",
- configSignoff: true,
- configVerbose: "never",
- expected: []string{"commit", "--signoff", "--no-verbose"},
- },
}
for _, s := range scenarios {
@@ -156,7 +135,6 @@ func TestCommitCommitEditorCmdObj(t *testing.T) {
t.Run(s.testName, func(t *testing.T) {
userConfig := config.GetDefaultConfig()
userConfig.Git.Commit.SignOff = s.configSignoff
- userConfig.Git.Commit.Verbose = s.configVerbose
runner := oscommands.NewFakeRunner(t).ExpectGitArgs(s.expected, "", nil)
instance := buildCommitCommands(commonDeps{userConfig: userConfig, runner: runner})