mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-11-25 04:43:08 +03:00
standardise how we read from the config
This commit is contained in:
@@ -13,10 +13,7 @@ func (c *GitCommand) usingGpg() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
gpgsign, _ := c.getLocalGitConfig("commit.gpgsign")
|
||||
if gpgsign == "" {
|
||||
gpgsign, _ = c.getGlobalGitConfig("commit.gpgsign")
|
||||
}
|
||||
gpgsign := c.GetConfigValue("commit.gpgsign")
|
||||
value := strings.ToLower(gpgsign)
|
||||
|
||||
return value == "true" || value == "1" || value == "yes" || value == "on"
|
||||
@@ -25,14 +22,8 @@ func (c *GitCommand) usingGpg() bool {
|
||||
// Push pushes to a branch
|
||||
func (c *GitCommand) Push(branchName string, force bool, upstream string, args string, promptUserForCredential func(string) string) error {
|
||||
followTagsFlag := "--follow-tags"
|
||||
followsign, _ := c.getLocalGitConfig("push.followTags")
|
||||
if followsign == "false" {
|
||||
if c.GetConfigValue("push.followTags") == "false" {
|
||||
followTagsFlag = ""
|
||||
} else if followsign == "" {
|
||||
followsign, _ = c.getGlobalGitConfig("push.followTags")
|
||||
if followsign == "false" {
|
||||
followTagsFlag = ""
|
||||
}
|
||||
}
|
||||
|
||||
forceFlag := ""
|
||||
|
||||
Reference in New Issue
Block a user