Enable commenting on commit messages

The commit message is now shown as a magical "Commit Message" file at
the start of each patch listing.  Normally its compared against the
empty blob content, and thus appears all new.  When comparing between
two patch sets the message is compared against the message of the other
patch set, enabling a fast view of what was modified in the message.

When showing a commit message we use a friendly format that looks a
lot like the `git log --format=fuller` layout, only we show the parent
commit and its short subject in addition to the other headers.  This
helps reviewers to identify a rebase, or easily see merges.

Comments made against the commit message are saved under the
file "/COMMIT_MSG".  Any name starting with "/" is legal in a Git
repository because the empty string is not a valid tree entry name.
Consequently we are reasonably safe to use "/" to denote a meta file
which will never appear in real repositories.  The name "COMMIT_MSG"
comes from the name of the file some versions of Git used to store
the message-in-progress under ".git" in, and really has no important
meaning other than to be unique within a Gerrit database.

Bug: issue 361
Change-Id: I11004eddfa7ab10e6491eedcf437771bf1e5af64
Signed-off-by: Shawn O. Pearce <sop@google.com>
15 files changed