From 9bad0337fe0c52d0fe6c91d0135201a4570b0c7e Mon Sep 17 00:00:00 2001 From: Anthony HAMON Date: Wed, 12 Sep 2018 07:50:49 +0200 Subject: [PATCH] commands/git : swap global/local get config --- pkg/commands/git.go | 4 ++-- pkg/commands/git_test.go | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pkg/commands/git.go b/pkg/commands/git.go index 4eb62a7fd..ecbd702c1 100644 --- a/pkg/commands/git.go +++ b/pkg/commands/git.go @@ -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) diff --git a/pkg/commands/git_test.go b/pkg/commands/git_test.go index 18d90b765..bda3ea225 100644 --- a/pkg/commands/git_test.go +++ b/pkg/commands/git_test.go @@ -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) }