prepare-commit-msg hook and git gui

2 messages, 2 authors, 2016-06-15 · open the first message on its own page

prepare-commit-msg hook and git gui

From: Joshua Williams <hidden>
Date: 2016-06-15 22:45:17

I've created a prepare-commit-msg hook that composes a basic
template needed to be filled out by users doing a commit.  When
I issue a 'git commit' it works great.  However, if I use 'git gui'/
'git citool' then the template never appears in the "commit
message".  It appears that the prepare-commit-msg hook is
either not run while invoking git gui or git gui is not properly
displaying the generated commit message in the commit
message pain.  Is there some git gui configuration that needs to
be done to accomplish this?  Is this a git gui bug?  Or is it
simply some kind of driver error?

The commit-msg hook does appear to be run after hitting the
commit button in git gui and git gui does display the proper
output from the commit-msg hook.  It appears that this is a
prepare-commit-msg only issue...

Thanks for any info!

- Josh

Re: prepare-commit-msg hook and git gui

From: Shawn O. Pearce <hidden>
Date: 2016-06-15 22:45:17

Joshua Williams [off-list ref] wrote:
The commit-msg hook does appear to be run after hitting the
commit button in git gui and git gui does display the proper
output from the commit-msg hook.  It appears that this is a
prepare-commit-msg only issue...
git-gui does not invoke the prepare-commit-msg hook.  So it
cannot display its output for you.

Patches are welcome.  ;-)

-- 
Shawn.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help