mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-05-31 23:19:40 +02:00
"step one towards dealing with gpgsign"
This commit is contained in:
parent
2f50cbf2b8
commit
92e75d4602
@ -176,7 +176,7 @@ func handleCommitPress(g *gocui.Gui, filesView *gocui.View) error {
|
|||||||
if message == "" {
|
if message == "" {
|
||||||
return createErrorPanel(g, "You cannot commit without a commit message")
|
return createErrorPanel(g, "You cannot commit without a commit message")
|
||||||
}
|
}
|
||||||
if output, err := gitCommit(message); err != nil {
|
if output, err := gitCommit(g, message); err != nil {
|
||||||
return createErrorPanel(g, output)
|
return createErrorPanel(g, output)
|
||||||
}
|
}
|
||||||
refreshFiles(g)
|
refreshFiles(g)
|
||||||
|
@ -447,7 +447,12 @@ func removeFile(file GitFile) error {
|
|||||||
return err
|
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 + "\"")
|
return runDirectCommand("git commit -m \"" + message + "\"")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user