Getting diff in commit-msg hook?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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





--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux