Git pre-receive hook

Posted by Ralphz on Stack Overflow See other posts from Stack Overflow or by Ralphz
Published on 2010-04-03T01:40:50Z Indexed on 2010/04/03 1:43 UTC
Read the original article Hit count: 354

Filed under:

Hi

When you enable pre-receive hook for git repository:

It takes no arguments, but for each ref to be updated it receives on standard input a line of the format:

< old-value > SP < new-value > SP < ref-name > LF

where < old-value > is the old object name stored in the ref, < new-value > is the new object name to be stored in the ref and is the full name of the ref. When creating a new ref, < old-value > is 40 0.

Does anyone can explain me how do I examine all the files that will be changed in the repository if i allow this commit?

I'd like to run that files through some scripts to check syntax and so on.

Thanks.

© Stack Overflow or respective owner

Related posts about git