[MERGE] whitespace normalization
Aaron Bentley
aaron at aaronbentley.com
Fri Jul 25 05:36:06 BST 2008
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Ben Finney wrote:
> Aaron Bentley <aaron at aaronbentley.com> writes:
>
>> we try to improve the codebase gradually. If a line has trailing
>> whitespace, we wait until we need to change the line anyhow, and
>> then strip the trailing whitespace at the same time.
>
> Thanks, this does explain why you prefer to see the changes
> separately, instead of a single "fix whitespace" patch. I don't see
> that it in any way prevents spurious whitespace-related conflicts,
> though.
No whitespace changes happen until there are non-spurious changes. At
that point, the whitespace changes are part of a non-spurious change.
> The trouble is, I don't see what's preventing regressions from making
> their way in.
I don't think we need to be that rigid about whitespace. As long as
we're fixing more than we're breaking, I think we're doing fine.
> That is, if Bazaar developer Albert has their editor configured to fix
> whitespace automatically on files so he doesn't need to rely on
> error-prone manual whitespace editing, what prevents spurious
> conflicts with existing changes on lines that didn't already conform?
Albert's change will not be merged because of its spurious changes.
> Are you saying developers on such a code base should *not*
> automatically reindent and strip trailing whitespace from files, even
> though that would conform to the preferred style of the code base?
Yes.
> That, instead, developers should always and forever rely on
> error-prone manual whitespace editing, in order not to cause "spurious
> conflicts" with lines that don't yet conform to the style guide?
Yes.
Aaron
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFIiVg20F+nu1YWqI0RAotTAKCHvVHM7o3goc6ja3MeQ4Eyhk0g/wCeISti
5zttk71gup4b2c9kn4NHKxc=
=3QtQ
-----END PGP SIGNATURE-----
More information about the bazaar
mailing list