git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Get rid of .git/branches/ and .git/remotes/?

From
Andreas Ericsson <ae@op5.se>
Date
Nov 22, 2005, 08:13 UTC
Message-ID
<4382D31E.40400@op5.se>
In-Reply-To
<20051122032014.32539.qmail@science.horizon.com>
linux@horizon.com wrote:
Show 18 quoted lines
> 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
Previous: Adrien BeauNext: linux@horizon.com
Message 7 of 9 in “Re: Get rid of .git/branches/ and .git/remotes/?”
  1. linux@horizon.comNov 22, 2005
  2. Linus TorvaldsNov 22, 2005
  3. linux@horizon.comNov 22, 2005
  4. Andreas EricssonNov 22, 2005
  5. Nikolai WeibullNov 22, 2005
  6. Adrien BeauNov 22, 2005
  7. Andreas EricssonNov 22, 2005
  8. linux@horizon.comNov 22, 2005
  9. Andreas EricssonNov 22, 2005

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.