Getting diff in commit-msg hook?

From: Gerd Knops <hidden>
Date: 2016-06-15 22:46:16

When I commit certain files, I would like to send a diff via email to
interested parties.

So I added a commit-msg hook, which checks the list of files for that commit.
That part works fine. However in the email I would like to include a
diff of the file(s) in question.

Now when I run "git diff -- '$file'", I get no output, probably because the
file is in some semi-committed state.

So how can I obtain a diff for a file in a commit-msg hook?

Thanks

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