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

Re: git-svn and empty directories

From
EWEric Wong <normalperson@yhbt.net>
Date
Dec 21, 2008, 07:08 UTC
Message-ID
<20081221070854.GA22014@hand.yhbt.net>
In-Reply-To
<200812161353.49796.thomas.jarosch@intra2net.com>
Thomas Jarosch <thomas.jarosch@intra2net.com> wrote:
Show 10 quoted lines
> Hello Eric and Deskin,
> 
> I'm currently looking into preserving empty directories from a SVN repository 
> by automatically creating empty .gitignore files for them.
> 
> The control flow of the git-svn code is still a jungle to me,
> maybe you have a hint how to implement a proof-of-concept code?
> 
> I don't think I can just touch a .gitignore file in get_untracked()
> and those files will magically turn up in git's index...
Hi Thomas,

Modern git-svn never touches the working tree during fetch, it hashes objects into the database and adds those to the indexes directly.

However, I don't think your proposal is a good idea since it adds too much "magic". Complex special cases for delta application if the .gitignore gets real content and backwards-incompatibility since I know some git-svn users already rely on pushing .gitignore files (empty or otherwise) to an upstream SVN repo.

The minor problem of missing empty directories isn't big enough to be worth the trouble IMHO.

The unhandled.log is made to be machine parseable, so if somebody really wanted to recreate empty direct after checkout, they could write a script that parses it and creates it based on the history of the current working tree.

-- 
Eric Wong
Previous: Thomas JaroschNext: Thomas Jarosch
Message 2 of 3 in “git-svn and empty directories”
  1. Thomas JaroschDec 16, 2008
  2. Eric WongDec 21, 2008
  3. Thomas JaroschDec 22, 2008

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.