git-codereview: factor pending commit formatting

This lifts the code to format a commit for the pending subcommand in
to its own function in preparation for using it to format lines in git
submit -i scripts.

Change-Id: I2522256b4e290a7a2f39b28918f7a27ddd1dbc6b
Reviewed-on: https://go-review.googlesource.com/16675
Reviewed-by: Andrew Gerrand <adg@golang.org>
1 file changed