Re: [StGIT PATCH] Do not mess-up with commit message formatting when sending email
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.
> 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
2008/8/4 Samuel Tardieu <[hidden email]>:
> The short description, which will be used as the email subject,
> gets its leading and trailing blanks removed.
> The long description gets its trailing blanks removed as well
> as any leading empty lines. Leading blanks are left untouched
> to preserve the formatting.