1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-05-31 23:19:40 +02:00

commands/git : swap global/local get config

This commit is contained in:
Anthony HAMON 2018-09-12 07:50:49 +02:00
parent f03544f392
commit 9bad0337fe
2 changed files with 3 additions and 3 deletions

View File

@ -280,9 +280,9 @@ func (c *GitCommand) AbortMerge() error {
// usingGpg tells us whether the user has gpg enabled so that we can know // 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 // whether we need to run a subprocess to allow them to enter their password
func (c *GitCommand) usingGpg() bool { func (c *GitCommand) usingGpg() bool {
gpgsign, _ := c.getGlobalGitConfig("commit.gpgsign") gpgsign, _ := c.getLocalGitConfig("commit.gpgsign")
if gpgsign == "" { if gpgsign == "" {
gpgsign, _ = c.getLocalGitConfig("commit.gpgsign") gpgsign, _ = c.getGlobalGitConfig("commit.gpgsign")
} }
value := strings.ToLower(gpgsign) value := strings.ToLower(gpgsign)

View File

@ -735,8 +735,8 @@ func TestGitCommandMerge(t *testing.T) {
func TestGitCommandUsingGpg(t *testing.T) { func TestGitCommandUsingGpg(t *testing.T) {
type scenario struct { type scenario struct {
testName string testName string
getGlobalGitConfig func(string) (string, error)
getLocalGitConfig func(string) (string, error) getLocalGitConfig func(string) (string, error)
getGlobalGitConfig func(string) (string, error)
test func(bool) test func(bool)
} }