On 2008-07-31 14:50:05 +0200, Samuel Tardieu wrote:
The short description, which will be used as the email subject, gets
its leading and trailing whitespaces removed.
OK, good.
The long description only gets its trailing whitespaces removed to
preserve commit message formatting, e.g. in the case of a
ChangeLog-style commit message, as well as empty leading lines.
I'd like a better description of this change, please. If I'm not
mistaken, we used to do _only_ left stripping of the body. You change
that to left stripping of only newlines, but also add right stripping
for each line. I'm all for these changes, but the commit message
confused me a lot.
- long_descr = '\n'.join(descr_lines[1:]).lstrip()
+ long_descr = '\n'.join([l.rstrip() for l in descr_lines[1:]]).lstrip('\n')
We require Python 2.4 or later, so you can skip the square brackets
here.
--
Karl Hasselström, kha@treskal.com
www.treskal.com/kalle