-
-
Notifications
You must be signed in to change notification settings - Fork 279
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Description
Hi,
The Git console doesn't open when a hook fails. There's no user feedback at all indicating something failed.
Example minimal git hook provided in minimal config section.
Neovim version
NVIM v0.10.4
Build type: Release
LuaJIT 2.1.1713484068
Operating system and version
Debian 12
Steps to reproduce
- nvim -u ./minimal.lua
- add files to stage
- try to commit
- nothing happens (normal), no message is displayed
Expected behavior
The console should auto-open to let the user see the hook output.
Actual behavior
The hook output is not displayed.
Minimal config
Minimal setup:
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
if not vim.loop.fs_stat(lazypath) then
vim.fn.system({
"git",
"clone",
"--filter=blob:none",
"https://github.com/folke/lazy.nvim.git",
"--branch=stable", -- latest stable release
lazypath,
})
end
vim.opt.rtp:prepend(lazypath)
require("lazy").setup({
"NeogitOrg/neogit",
dependencies = {
"nvim-lua/plenary.nvim", -- required
"nvim-telescope/telescope.nvim", -- optional
"sindrets/diffview.nvim", -- optional
},
config = function()
require("neogit").setup({})
end,
})
.git/hooks/commit-msg
:
#!/bin/sh
echo "Hook failed"
exit 1
andrewwong1221, ketsueki33 and skrobul
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working