Thanks Thomas, And yes I had read this and also I tried with git log but this won't works since git log is only created after the push, which means it won't compare the new push comment, it only compare the previous pushed comment to trigger the hooks. since what I need is trigger the hooks when new push comment not meet my prerequisites. Thanks Ling
On Wednesday, September 4, 2013 2:52:15 AM UTC-4, Thomas Ferris Nicolaisen wrote: > > On Tuesday, September 3, 2013 10:34:38 PM UTC+2, Ling wrote: > >> Hello, >> >> I'm kinds of new on Git and now we are trying to get the hooks enabled >> into one of our server repository, what we want this hooks doing is to >> prevent when local users that push the changes from their local repo to >> server repo, we need to first check the commit comments to see if it >> include some specific words, (i.e. 999). so what I tried is created an >> update hooks with compare the git log, but looks like this won't works >> correctly since this is only check the previous pushed comments. so I >> believe I will need to use pre-receive hook, but here is my quesiton? What >> is the basic flow for pre-receive hook for me to compare the local push >> commets with server existing comments? >> > > You're looking for the pre-receive or update hook. Read through > http://git-scm.com/book/en/Customizing-Git-Git-Hooks#Server-Side-Hooks > > Here's an example showing inspection of the commit message: > http://stackoverflow.com/questions/2524101/git-how-do-we-verify-commit-messages-for-a-push > -- You received this message because you are subscribed to the Google Groups "Git for human beings" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/groups/opt_out.
