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

Re: Add an empty directory?

From
Linus Torvalds <torvalds@osdl.org>
Date
Aug 13, 2005, 19:41 UTC
Message-ID
<Pine.LNX.4.58.0508131238150.3553@g5.osdl.org>
In-Reply-To
<20050813181945.GA2191@hpsvcnb.fc.hp.com>
On Sat, 13 Aug 2005, Carl Baldwin wrote:
> 
> The bottom line is that I don't really see many situations where it is
> absolutely necessary but it is a convenience.  Not supporting it may
> seem like an artificial limit that really didn't need to be there.

Well, there is an argument for not supporting it, namely that the way patches work, traditionally a directory that became empty is deleted (because patches have no way of saying "remove directory" or "create directory").

So a system where the existence of a directory flows from the existence of the files within the directory will automatically always do the right thing with patches floating around.

Which is a big deal for me, since most of the kernel development still ends up being done with patches. Yes, we merge things with git, but a lot of the development is about passing patches around for review and commentary.

And the thing is, you can always create the directory in your workspace. Git won't care, and won't know about it, but there's really no downside to it.

			Linus
Previous: Carl BaldwinNext: Petr Baudis
Message 4 of 7 in “Add an empty directory?”
  1. Carl BaldwinAug 13, 2005
  2. Petr BaudisAug 13, 2005
  3. Carl BaldwinAug 13, 2005
  4. Linus TorvaldsAug 13, 2005
  5. Petr BaudisAug 13, 2005
  6. Carl BaldwinAug 13, 2005
  7. Junio C HamanoAug 13, 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.