vim-gina icon indicating copy to clipboard operation
vim-gina copied to clipboard

[Gina commit] can not detect the failure of pre-commit hook of git repo

Open tracyone opened this issue 7 years ago • 3 comments

In every git repos:

There are some shell scripts in .git/hooks/.

One of these script is pre-commit which is used to detect coding style of codes that is going to be commited.

It will fail if your code isn't follow it's rule.

In command line,

git commit will fail to start a editor to edit commit message.

tracyone avatar Jan 30 '18 14:01 tracyone

Related to https://github.com/lambdalisue/gina.vim/issues/115

Personally, I don't use hooks so I don't have any idea of what the ideal behavior for handling that.

Do you have any idea? We need to consider #115 as well.

lambdalisue avatar Jan 30 '18 14:01 lambdalisue

There is a easy way to reproduce this issue, Please see

https://asciinema.org/a/lMJxyUQIa3c7mjHJY9sGmQ71m

I think Gina just need to get the exit status of pre-commit script and prompt some message to user.

Just like vim-fugitive do.

tracyone avatar Jan 31 '18 14:01 tracyone

I understand the issue. I'm wondering what kind of behavior is ideal. I think some people would argue with the behavior you describe while it blocks Vim.

lambdalisue avatar Jan 31 '18 15:01 lambdalisue