[Qt-creator] prepare-commit-msg and commit-msg hooks

Orgad Shaneh orgads at gmail.com
Tue Jan 9 12:19:33 CET 2018


On Tue, Jan 9, 2018 at 1:04 PM, Oswald Buddenhagen <oswald.buddenhagen at qt.io
> wrote:

> On Tue, Jan 09, 2018 at 10:43:09AM +0100, Tobias Hunger wrote:
> > Hooks do get run at this point, but it is admittedly a bit late for
> > the pre-commit or the prepare-commit-msg hook. Do you have any idea
> > how we can improve this -- without reimplementing all the logic built
> > into git?
> >
> by providing a stub editor and running git commit with $EDITOR pointing
> to that stub as soon as the dialog is opened. from there it's just a bit
> of ipc, which can be mostly ripped off from the debugger stub.


What if there are no staged files? git commit will not execute any hook on
this case,
and this is the typical state when the Git Commit dialog is opened.

- Orgad
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/qt-creator/attachments/20180109/3c7facee/attachment.html>


More information about the Qt-creator mailing list