summaryrefslogtreecommitdiffstats
path: root/pkg/gui/files_panel.go
diff options
context:
space:
mode:
authorMark Sagi-Kazar <mark.sagikazar@gmail.com>2021-11-14 14:31:35 +0100
committerJesse Duffield <jessedduffield@gmail.com>2021-12-25 12:01:55 +1100
commitfdf0d4a2c3f1112b5b9063ac9a73f18fab2362ef (patch)
tree2b74a0ddbb3acbbffb30c0e02551ad2bfbf36571 /pkg/gui/files_panel.go
parentb4ea565c99a91f701db24ca5a886da40de84dc0b (diff)
implement signoff
Signed-off-by: Mark Sagi-Kazar <mark.sagikazar@gmail.com>
Diffstat (limited to 'pkg/gui/files_panel.go')
-rw-r--r--pkg/gui/files_panel.go8
1 files changed, 7 insertions, 1 deletions
diff --git a/pkg/gui/files_panel.go b/pkg/gui/files_panel.go
index a6f6a9f08..3bc600420 100644
--- a/pkg/gui/files_panel.go
+++ b/pkg/gui/files_panel.go
@@ -458,8 +458,14 @@ func (gui *Gui) handleCommitEditorPress() error {
return gui.promptToStageAllAndRetry(gui.handleCommitEditorPress)
}
+ args := []string{"commit"}
+
+ if gui.Config.GetUserConfig().Git.Commit.SignOff {
+ args = append(args, "--signoff")
+ }
+
return gui.runSubprocessWithSuspenseAndRefresh(
- gui.OSCommand.WithSpan(gui.Tr.Spans.Commit).PrepareSubProcess("git", "commit"),
+ gui.OSCommand.WithSpan(gui.Tr.Spans.Commit).PrepareSubProcess("git", args...),
)
}