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

Re: Empty directories in Git: Current guidance for historical commits?

From
Wwafflecode@openmail.cc <wafflecode@openmail.cc>
Date
Sep 5, 2017, 22:17 UTC
Message-ID
<20170905221732.Horde.QL8bINNPhkH82YmIiqhsUY9@vfemail.net>
In-Reply-To
<f8ed8f0b-a2e1-9e7a-bf79-2b7629b838f2@web.de>
Quoting Torsten Bögershausen <tboegi@web.de>:
Show 15 quoted lines
>> Is just dropping a ".gitignore" or "README" file in the empty  
>> directories during
>> conversion still the most reasonable approach?
>
> A .gitignore will, but may cost 0.001% CPU time when running "git status".
> I have seen systems that create a file called ".empty" in every directory.
>
>> If so, is there a way to do this
>> automatically during the conversion using "git svn" or the like?
>
> Not what I am aware of.
> And even if, the .empty files need to be removed, once the directory is
> removed.
> And we don't have logic for that, as far as I know.
>

So upon re-reading the git-svn docs, there apparently _are_ "--preserve-empty-dirs" and "--placeholder-filename=<filename>" options.

I'm not sure how I missed these.  :-/

If I understand correctly, it sounds like exactly what I want. i.e. a placeholder file being added (and tracked) to each empty folder. Are there known issues or limitations to be aware of?

Thank you, David

-------------------------------------------------

ONLY AT VFEmail! - Use our Metadata Mitigator to keep your email out of the NSA's hands! $24.95 ONETIME Lifetime accounts with Privacy Features! 15GB disk! No bandwidth quotas! Commercial and Bulk Mail Options!

Previous: Torsten BögershausenNext: Jeff King
Message 3 of 4 in “Empty directories in Git: Current guidance for historical commits?”
  1. wafflecode@openmail.ccSep 5, 2017
  2. Torsten BögershausenSep 5, 2017
  3. wafflecode@openmail.ccSep 5, 2017
  4. Jeff KingSep 5, 2017

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.