Thread (5 messages) flat view 5 messages, 4 authors, 2016-06-15

Re: [RFC PATCH] Re: Empty directories...

From: David Kastrup <hidden>
Date: 2016-06-15 22:43:22

Linus Torvalds [off-list ref] writes:
On Sat, 21 Jul 2007, David Kastrup wrote:
quoted
Linus, a directory is simply non-existent inside of git.
You need to learn git first.

A directory doesn't exist IN THE INDEX (until my patches). But you
need to learn about the object database and the SHA1's. That's the
real meat of git, and it sure as hell knows about directories.
To put it in another way: what would happen if trees were removed from
git's repository completely?  Instead we would just stipulate that git
should only track files, not trees, and that it would remove an
outside directory when removing the last file from the repository that
can't be accomodated without such a directory.

Now the effect would be that git would become quite inefficient.  But
it would not change its behavior in any other way.  Because it knows
_zilch_ about directories.  It knows about the hierarchy of the
_contents_, but the directories, the physical entities in the work
tree?  It deduces a convenient point of time to try deleting them
(when a tree collapses), and it deduces that they are there as long as
it is tracking their content, but no information about a _directory_
other than its _contents_ ever enter the repository or index.  About
its _existence_, git only keeps circumstantial evidence.

-- 
David Kastrup, Kriemhildstr. 15, 44793 Bochum
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help