Skip to content

Commit

Permalink
add overrideGpg switch, which prevents lazygit from spawning a separa…
Browse files Browse the repository at this point in the history
…te process when using GPG

Signed-off-by: Randshot <randshot@norealm.xyz>
  • Loading branch information
no-realm committed May 30, 2020
1 parent e73f4c6 commit 65e955c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
5 changes: 5 additions & 0 deletions pkg/commands/git.go
Original file line number Diff line number Diff line change
Expand Up @@ -435,6 +435,11 @@ 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 {
overrideGpg := c.Config.GetUserConfig().GetBool("git.overrideGpg")
if overrideGpg {
return false
}

gpgsign, _ := c.getLocalGitConfig("commit.gpgsign")
if gpgsign == "" {
gpgsign, _ = c.getGlobalGitConfig("commit.gpgsign")
Expand Down
1 change: 1 addition & 0 deletions pkg/config/app_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -270,6 +270,7 @@ git:
args: ""
skipHookPrefix: 'WIP'
autoFetch: true
overrideGpg: false # prevents lazygit from spawning a separate process when using GPG
update:
method: prompt # can be: prompt | background | never
days: 14 # how often a update is checked for
Expand Down

0 comments on commit 65e955c

Please sign in to comment.