5

I'm trying to get a git commit email hook running using Git on Windows. I'm sure I've got my copy of contrib/hooks/post-receive-email (placed in the project's .git/hooks/post-commit) script messed up, or I'm missing an important node in my config, but I don't know where I would see any error messages.

Would they be echoed to stdout when I commit using a shell? Is there some flag I would need to set or pass to git commit to see them (I tried -v with no apparent effect)?

EDIT Here are the repo-specific config vals I've added:

  • sendemail.smtpserver=smtp.mycompany.com
  • hooks.mailinglist=me@domain.com

UPDATE The overall problem is that git's built-in mail doesn't work on windows (which makes perfect sense, of course), but at least now I know where to look for output from my hacking attempts.

cori
  • 8,666
  • 7
  • 45
  • 81
  • Did you ever get this to work? I want to do the same thing... – bart Sep 02 '12 at 05:58
  • hey @bart, just saw your question. I did, but that's an awfully long time ago and I have no recollection of what I did. Sorry. – cori Apr 24 '14 at 19:06

1 Answers1

4

Are you sure the hook is actually being executed? (Make sure it's executable!) The post-commit hook is run in the same way as git-commit, so if you commit from a shell, you should see the output of all the commit-related hooks along with the output of git-commit itself in that terminal.

Cascabel
  • 479,068
  • 72
  • 370
  • 318
  • 2
    adding a echo to the script gets me that content back, so yes, it's being executed. Thia answers my question as to where to see the error information, thanks! – cori Aug 10 '10 at 14:31