Only using the top commit for code review summaries
Review Request #4147 — Created May 14, 2013 and submitted
When dealing with a merge commit the '%s' pretty pattern is the newline concatenation of the summaries... * 4182bc3 atagar@torproject.org (HEAD, tmp) - merging branches |\ | * 1f71921 atagar@torproject.org - second branch * | b41fb93 atagar@torproject.org - first branch |/ * ae6aca7 atagar@torproject.org - base commit % git log --pretty=format:%s HEAD^.. merging branches second branch This previously caused 'postreview.py --guess-summary' to fail for merge commits since summaries cannot contain newlines. This was fixed by replacing newlines with spaces... https://github.com/reviewboard/rbtools/commit/4ee9be4e 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^!' instead... % git log --pretty=format:%s HEAD^! merging branches This is available in the 'tip_commit_for_summary' branch of my repo... https://github.com/atagar/rbtools/tree/tip_commit_for_summary https://github.com/atagar/rbtools/commit/c77e01560eb3fe6142f05f6495f5e5f298f5b322
Tested by posting a code review using '--guess-summary' with the above merge commit.