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

Re: [BUG] git-svn dcommit fails (connection closed unexpectedly)

From
Linus Torvalds <torvalds@linux-foundation.org>
Date
May 14, 2007, 17:26 UTC
Message-ID
<alpine.LFD.0.98.0705141016370.6739@woody.linux-foundation.org>
In-Reply-To
<20070513210128.GA13428@muzzle>
On Sun, 13 May 2007, Eric Wong wrote:
Show 7 quoted lines
> Karl Hasselström <kha@treskal.com> wrote:
> 
> > It might be a net win to let git-svn handle empty directories by
> > creating an empty .git-svn-empty-dir file in them, instead of
> > pretending they don't exist.
> 
> No.  This is *WAY* too ugly.

I wouldn't personally mind if somebody taught git to just track empty directories too.

There is no fundamental git database reason not to allow them: it's in fact quite easy to create an empty tree object. The problems with empty directories are in the *index*, and they shouldn't be insurmountable.

I never wanted empty directories for the kernel, but there is nothing really fundamentally wrong with them either. They do have some problems, which is why I don't particularly like tracking them, but if *not* tracking them causes more problems for people who import from SVN, I could easily see the balance moving towards "let people do it if they want".

In fact, I think the subproject support might have made it easier to track directories as empty directory entries. Pretty much every place that got impacted by subprojects would be where empty directory entries would be handled too.

In fact, one of the questions when tracking empty directories is whether you should track non-empty directories too. IOW, should we _always_ put the directory entry into the index (even when it's not empty), or should we do it only when somebody explicitly asks for it. I suspect the "always" case would is the right answer (ie a read-tree would always add a directory entry to the index before it starts adding the actual entries in the read-tree)

Anybody want to try it?
			Linus
Previous: Eric WongNext: Matthieu Moy
Message 16 of 18 in “[BUG] git-svn dcommit fails (connection closed unexpectedly)”
  1. Matthieu MoyMay 11, 2007
  2. Lars HjemliMay 11, 2007
  3. Lars HjemliMay 11, 2007
  4. Matthieu MoyMay 11, 2007
  5. Matthieu MoyMay 14, 2007
  6. Eric WongMay 19, 2007
  7. git-svn: avoid crashing svnserve when creating new directoriesEric Wong, May 19, 2007
  8. Matthieu MoyMay 19, 2007
  9. Eric WongMay 19, 2007
  10. Matthieu MoyMay 19, 2007
  11. Eric WongMay 13, 2007
  12. Martin EisenhardtMay 13, 2007
  13. Karl HasselströmMay 13, 2007
  14. Eric WongMay 13, 2007
  15. Eric WongMay 14, 2007
  16. Linus TorvaldsMay 14, 2007
  17. Matthieu MoyMay 14, 2007
  18. Matthieu MoyMay 14, 2007

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.