Re: [StGIT PATCH] Do not mess-up with commit message formatting when sending email

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxx
      www.treskal.com/kalle
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux