-
Notifications
You must be signed in to change notification settings - Fork 263
Closed
Labels
feature requestA new lefthook feature descriptionA new lefthook feature description
Description
⚡ Summary
Sometimes there are failures coming from git, but the output isn't shown so it is very hard to start debugging. LEFTHOOK_VERBOSE=1 can help, but I think it'd be better for users to have more context up front
Value
Lefthook git-related failures will be easier to debug. Having an more specific error will help people find/file reports
Behavior and configuration changes
Here's the current behavior:
Here's the behavior with LEFTHOOK_VERBOSE=1:
Not sure exactly what the output should look like, but some quick initial thoughts:
[lefthook] Couldn't restore hidden unstaged files: git had exit code 1
cmd: [git apply -v --whitespace=nowarn --recount --unidiff-zero .git/info/lefthook-unstaged.patch]
out: Checking patch lua/plugins/editor.lua...
error: while searching for:
opts = {
},
error: patch failed: lua/plugins/editor.lua:122
error: lua/plugins/editor.lua: patch does not apply
Checking patch lua/plugins/lsp.lua...
Checking patch lua/plugins/telescope.lua...
error: while searching for:
function ()
error: patch failed: lua/plugins/telescope.lua:238
error: lua/plugins/telescope.lua: patch does not apply
Metadata
Metadata
Assignees
Labels
feature requestA new lefthook feature descriptionA new lefthook feature description

