Re: Get rid of .git/branches/ and .git/remotes/?
From: Andreas Ericsson <hidden>
Date: 2016-06-15 22:42:13
linux@horizon.com wrote:
Actually, most indentation-sensitive languages have a simpler solution:
they don't try to convert whitespace strings to a number like "horizontal
position"; they just compare strings.
Each line must either have the same indentation string as some active
scope, or its indentation must have the current innermost scope as a
prefix, in which case it introduces a new scope.
This allows anything except for
foo # No prefix
bar # 4 spaces prefix
baz # tab prefix: illegal!
The "baz" line would have to begin with 4 spaces to be legal.
They could be followed by 4 more spaces, or a tab, or any other
whitespace pattern.
So, would this be considered legal or would it barf on baz?
foo # No prefix
bar # tab prefix
baz # 8 spaces prefix
Most people have tabsize at 8. Some don't. Some editors insert spaces
instead of tabs while others don't. If we just match strings we'll
end up with users sending bug-reports by cut'n pasting their perfectly
valid-looking config which mixes tabs and spaces just because it's
been edited by people using different editors.
Real fun would be if the mta sends tabs as spaces. Then there'd
be no way at all of telling if the config *is* valid or not.
--
Andreas Ericsson andreas.ericsson@op5.se
OP5 AB www.op5.se
Tel: +46 8-230225 Fax: +46 8-230231