diff options
author | Randshot <randshot@norealm.xyz> | 2020-05-30 23:39:07 +0200 |
---|---|---|
committer | Randshot <randshot@norealm.xyz> | 2020-05-30 23:39:07 +0200 |
commit | 65e955c622937ab64b9a7e447afc1180a2a95b9d (patch) | |
tree | e9ffc6ec82fce0bc9e32ba6325714e83827bc3c3 | |
parent | e73f4c6b7e921194545213b088a87c36b0d559eb (diff) |
add overrideGpg switch, which prevents lazygit from spawning a separate process when using GPG
Signed-off-by: Randshot <randshot@norealm.xyz>
-rw-r--r-- | pkg/commands/git.go | 5 | ||||
-rw-r--r-- | pkg/config/app_config.go | 1 |
2 files changed, 6 insertions, 0 deletions
diff --git a/pkg/commands/git.go b/pkg/commands/git.go index f7e004108..61daa06d9 100644 --- a/pkg/commands/git.go +++ b/pkg/commands/git.go @@ -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") diff --git a/pkg/config/app_config.go b/pkg/config/app_config.go index 9938113d7..f3c5a7690 100644 --- a/pkg/config/app_config.go +++ b/pkg/config/app_config.go @@ -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 |