mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-05-29 23:17:32 +02:00
commands/git : swap global/local get config
This commit is contained in:
parent
f03544f392
commit
9bad0337fe
@ -280,9 +280,9 @@ func (c *GitCommand) AbortMerge() error {
|
||||
// usingGpg tells us whether the user has gpg enabled so that we can know
|
||||
// whether we need to run a subprocess to allow them to enter their password
|
||||
func (c *GitCommand) usingGpg() bool {
|
||||
gpgsign, _ := c.getGlobalGitConfig("commit.gpgsign")
|
||||
gpgsign, _ := c.getLocalGitConfig("commit.gpgsign")
|
||||
if gpgsign == "" {
|
||||
gpgsign, _ = c.getLocalGitConfig("commit.gpgsign")
|
||||
gpgsign, _ = c.getGlobalGitConfig("commit.gpgsign")
|
||||
}
|
||||
value := strings.ToLower(gpgsign)
|
||||
|
||||
|
@ -735,8 +735,8 @@ func TestGitCommandMerge(t *testing.T) {
|
||||
func TestGitCommandUsingGpg(t *testing.T) {
|
||||
type scenario struct {
|
||||
testName string
|
||||
getGlobalGitConfig func(string) (string, error)
|
||||
getLocalGitConfig func(string) (string, error)
|
||||
getGlobalGitConfig func(string) (string, error)
|
||||
test func(bool)
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user