git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Getting diff in commit-msg hook?
@ 2009-02-22 21:03 Gerd Knops
  2009-02-23  2:35 ` Junio C Hamano
  0 siblings, 1 reply; 3+ messages in thread
From: Gerd Knops @ 2009-02-22 21:03 UTC (permalink / raw)
  To: git

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2009-02-23 19:07 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-02-22 21:03 Getting diff in commit-msg hook? Gerd Knops
2009-02-23  2:35 ` Junio C Hamano
2009-02-23 18:58   ` Gerd Knops

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).