Arguments to git hooks
- From
jaseem abid <jaseemabid@gmail.com>
- Date
- May 6, 2012, 18:35 UTC
- Message-ID
- <CAH-tXsB4PBS_YjW4DCjT6ORmNPomQ8XMPbKx3hxVNH=FyB2u3g@mail.gmail.com>
Hello all,
I am trying to write a hook '.git/hooks/commit-msg' to be run before every commit.
How can I pass arguments to the script? Now by default the only arg I am getting is `.git/COMMIT_EDITMSG'`. I would love to get the list of files I tried to commit also into the script so that I can run a lint program on it before committing it. How can I get this done?
V/r,
-- Jaseem Abid http://jaseemabid.github.com