diff options
author | Jesse Duffield <jessedduffield@gmail.com> | 2018-08-08 08:24:24 +1000 |
---|---|---|
committer | Jesse Duffield <jessedduffield@gmail.com> | 2018-08-08 08:24:24 +1000 |
commit | 92e75d4602b733e05b1dfdc774f1fc3e15f92cc8 (patch) | |
tree | 98c425a2e33445fb084090d9c24a1c9e524bcfea /gitcommands.go | |
parent | 2f50cbf2b87f9ab607345bedae9dc50393c98dfc (diff) |
"step one towards dealing with gpgsign"
Diffstat (limited to 'gitcommands.go')
-rw-r--r-- | gitcommands.go | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/gitcommands.go b/gitcommands.go index c8f81dd6b..0f5692e87 100644 --- a/gitcommands.go +++ b/gitcommands.go @@ -447,7 +447,12 @@ func removeFile(file GitFile) error { return err } -func gitCommit(message string) (string, error) { +func gitCommit(g *gocui.Gui, message string) (string, error) { + out, _ := runDirectCommand("git config --get commit.gpgsign") + if out != "" { + runSubProcess(g, "git", "commit", "-m", "\""+message+"\"") + return "", nil + } return runDirectCommand("git commit -m \"" + message + "\"") } |