git: Show index diff in commit message as comment

When git commit open the message editor is shows a brief status, something like this:

# Please enter the commit message for your changes. Lines starting
# with '#' will be ignored, and an empty message aborts the commit.
# On branch master
# Your branch is ahead of 'origin/master' by 26 commits.
#
# Changes to be committed:
#   (use "git reset HEAD <file>..." to unstage)
#
#   modified:   Showcase/src/com/gigantt/BorderArea.mxml
#   modified:   Showcase/src/com/gigantt/Client.mxml
#   modified:   Showcase/src/com/gigantt/GraphItem.mxml
#

How can I tweak git to show also the diff to be committed? I'm aware that it may be a long diff, but still.. so useful.

107
задан Assaf Lavie 20 January 2011 в 17:00
поделиться