jreybert / vimagit

Ease your git workflow within Vim
1.31k stars 49 forks source link

Pre-commit hook preventing commit leads to Vimagit wanting to amend the last commit #159

Open erAck opened 6 years ago

erAck commented 6 years ago

Having a pre-commit hook that vetoes the current commit (for example because of trailing blanks or other checks), Vimagit on pressing CC acts as if CA was pressed and wants to amend the last commit instead of creating a new one. Equally bad, it does not display the output of the commit hook.

jreybert commented 6 years ago

OK, I get your setup.

Anyway, could you provide your pre commit hook and a faulty commit please?

erAck commented 6 years ago

Hook in question is https://cgit.freedesktop.org/libreoffice/core/tree/.git-hooks/pre-commit Faulty commit would be any source file with a trailing blank on a line.

jreybert commented 6 years ago

OK thanks.