[RFC] Blank lines at the end of files
Eugene Wee
eugenew at starhub.net.sg
Fri Jun 29 10:08:03 BST 2007
Hi,
If this is taken in the direction of such a normalisation being
applicable to all projects that use Bazaar, perhaps it should be kept it
mind that the C++ standard (and perhaps C as well, I have not checked)
requires that non-empty source files must end in a new-line character.
Consequently, g++ and possibly other C++ compilers warn about missing
new-line characters at the end of source files.
Regards,
Eugene
Martin wrote:
> I am confused by this conversation. From a \r\n is-a-line-seperator
> perspective, there's always a blank line at the end of the file. But
> everyone is on the \n is-a-line-terminator side surely, so this is a
> debate just about \n vs. \n\n+ as terminal bytes which... does seem
> trivial.
> Isn't the real issue that diff histories with lots of meaningless
> changes back and forth are bad? No one accidentally renames every
> variable whenever they make a change to a file, or has an editor that
> renames variables without them noticing, but that is the case with
> spacing characters. Hence wars around tabs and spaces and style guides
> that need to be super-specific about how to space things correctly.
> Solving ancient problems like these is probably beyond the job of a
> version control system, but couldn't at least this one be resolved a
> la <http://bazaar-vcs.org/LineEndings> suggestions with something like
> a NormaliseFileTrailingSpace rule?
>
> Martin
>
More information about the bazaar
mailing list