Only using the top commit for code review summaries

Review Request #4147 — Created May 14, 2013 and submitted — Latest diff uploaded




When dealing with a merge commit the '%s' pretty pattern is the newline
concatenation of the summaries...

*   4182bc3  (HEAD, tmp) - merging branches
| * 1f71921  - second branch
* | b41fb93  - first branch
* ae6aca7  - base commit

% git log --pretty=format:%s HEAD^..
merging branches
second branch

This previously caused ' --guess-summary' to fail for merge
commits since summaries cannot contain newlines. This was fixed by replacing
newlines with spaces...

On reflection a summary of "merging branches second branch" isn't what we want
- it should be just the merge commit. We can achieve this by using 'HEAD^!'

% git log --pretty=format:%s HEAD^!
merging branches

This is available in the 'tip_commit_for_summary' branch of my repo...
Tested by posting a code review using '--guess-summary' with the above merge