[BUG] Strip trailing whitespace from commit message

Jari Aalto jari.aalto at cante.net
Thu Dec 21 17:32:49 GMT 2006

John Arbash Meinel <john at arbash-meinel.com> writes:

> Jari Aalto wrote:
>> I mistakely did:
>>     bzr ci -m "- use xmlSaveFile => xmlSaveFormatFileEnc "
>> Ooops, there was trailing space. Verify:
>>     bzr log src/data.c | cat -vET
>>     ------------------------------------------------------------$
>>     revno: 6$
>>     committer: jari.aalto at cante.net$
>>     branch nick: feature.clay-to-dlume$
>>     timestamp: Thu 2006-12-21 18:13:53 +0200$
>>     message:$
>>       - use xmlSaveFile => xmlSaveFormatFileEnc $
>> Please remove all trailing whitespcae from the commit message lines.
>> Jari
> I'm generally not comfortable modifying the data that users give us,
> unless there is a strict reason to.
> Especially if you start to have multiple lines. We don't necesarily know
> where the data came from, or if trailing whitespace is significant or not.

- When commit message is e.g sent via email, the trailing whitespcae
  would better be not signifant (bundles?). 
- In programming languages to write code so that trailing whitespace
  is significant, if bad programming. (coder's mistake; he might have
  not known better)
- Patches containg trailing whitespace is bad practise (again
  that might be user's and his editor's fault).

I understand this in principle, but I cannot imagine any legimate case
where commit message with trailing whitespcae is significant. I would
even consider that a bug in the program/process/user who did so


More information about the bazaar mailing list