summaryrefslogtreecommitdiffstats
path: root/gitcommands.go
diff options
context:
space:
mode:
authorJesse Duffield <jessedduffield@gmail.com>2018-08-08 08:24:24 +1000
committerJesse Duffield <jessedduffield@gmail.com>2018-08-08 08:24:24 +1000
commit92e75d4602b733e05b1dfdc774f1fc3e15f92cc8 (patch)
tree98c425a2e33445fb084090d9c24a1c9e524bcfea /gitcommands.go
parent2f50cbf2b87f9ab607345bedae9dc50393c98dfc (diff)
"step one towards dealing with gpgsign"
Diffstat (limited to 'gitcommands.go')
-rw-r--r--gitcommands.go7
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 + "\"")
}