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

git-svn does not honor preserve-empty-dirs

From
ADAndreas Dröscher <git@anticat.ch>
Date
Dec 14, 2015, 21:56 UTC
Message-ID
<566F3AF1.90305@anticat.ch>
Hi
I think git-svn 2.6.4 does not behave as intended.

According to the documentation preserve-empty-dirs should ensure that empty- directories are kept in all cases: "Create a placeholder file in the local Git repository for each empty directory fetched from Subversion. This includes directories that become empty by removing all entries in the Subversion repository (but not the directory itself)."

I've attached an svn repo to demonstrate the issue. Everything goes fine during the first 3 commits. In commit r4 a file is removed from the demo folder, but not the directory. This works in svn but not in git.

Steps to Reproduce:
1. Extract tar to a directory of your choice e.g. /tmp/svn/
2. git svn clone --stdlayout --preserve-empty-dirs file:///tmp/svn/
3. Now trunk is empty. However the directory demo should have been preserved.
I'm not a member of the mailing-list. Please CC me.

Best Wishes Andreas

SVN Commit Log: ------------------------------------------------------------------------ r4 | andreas | 2015-12-14 22:52:49 +0100 (Mo, 14. Dez 2015) | 1 Zeile

empty dir ------------------------------------------------------------------------ r3 | andreas | 2015-12-14 22:52:22 +0100 (Mo, 14. Dez 2015) | 1 Zeile

fill dir ------------------------------------------------------------------------ r2 | andreas | 2015-12-14 22:51:39 +0100 (Mo, 14. Dez 2015) | 1 Zeile

add empty dir demo ------------------------------------------------------------------------ r1 | andreas | 2015-12-14 22:50:46 +0100 (Mo, 14. Dez 2015) | 1 Zeile

initial import ------------------------------------------------------------------------

Message 1 of 1 in “git-svn does not honor preserve-empty-dirs”
  1. Andreas DröscherDec 14, 2015

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.