Thread (2 messages) flat view 2 messages, 2 authors, 2016-06-15
  • (off-list ancestor, not in this archive)
  • Re: tree sorting.. · Shawn O. Pearce <hidden> · 2016-06-15
  • Re: tree sorting.. · Linus Torvalds <torvalds@linux-foundation.org> · 2016-06-15

Re: tree sorting..

From: Linus Torvalds <torvalds@linux-foundation.org>
Date: 2016-06-15 22:43:00


On Fri, 16 Mar 2007, Shawn O. Pearce wrote:
The entire reason this happened is hysterical raisins.  Your first
draft of Git had trees as one flat structure, sorting complete
paths by their memcmp result.  Which is dead simple and worked.
No. 

It's *not* historical reasons. That's what I tried to explain.

It's absolutely *required*. Not because of the old flat layout, but 
because we want read-tree to translate 1:1 into the index.

And the index is a flat file. And it *needs* to be a flat file, because we 
need to open it and read it efficiently. If it wasn't a flat file, we'd 
have all the index operations taking as long as the tree operations take.
Now we are stuck with it.
No. How you need to accept it. It's that easy. It's not "stuck". It's 
"correct".

That's why I reacted to your irc thing. You seemed to think (and still 
apparently do) that the sorting is some messy mistake. It's anything but.

So yes, "foo" is *different* from "foo/". You just need to realize that 
they are two totally different entries. They have absolutely no 
relationship what-so-ever with each other, except that you obviously must 
not add one when the other exists.

		Linus
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help