We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 49b0e36 commit 19da9f0Copy full SHA for 19da9f0
1 file changed
lua/tinygit/commands/commit.lua
@@ -131,14 +131,15 @@ function M.smartCommit(opts)
131
if package.loaded["snacks"] then require("snacks").notifier.hide() end
132
133
-- don't open input if hook fails
134
+ local msg = (hookResult.stdout or "") .. (hookResult.stderr or "")
135
if hookResult.code ~= 0 then
- local msg = (hookResult.stdout or "") .. (hookResult.stderr or "")
136
- msg = "[Pre-commit hook failed]\n\n" .. msg
+ msg = "[Pre-commit hook failed]\n" .. msg
137
u.notify(msg, "error", { timeout = 0 }) -- no timeout, since relevant for user
138
- return
+ else
139
+ msg = "[Pre-commit hook result]\n" .. msg
140
+ u.notify(msg)
141
+ startCommit()
142
end
-
- startCommit()
143
end)
144
)
145
else
0 commit comments