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

bzr->git: keep empty directories

From
FNFelix Natter <fnatter@gmx.net>
Date
Jul 14, 2012, 14:41 UTC
Message-ID
<87sjcuz9q7.fsf@bitburger.home.felix>
hello,
when converting a repo from bzr to git:

mkdir freeplane-git1 cd freeplane-git1 git init . bzr fast-export --plain --export-marks=../marks.bzr ../trunk/ | git fast-import --export-marks=../marks.git git checkout

Empty directories are not contained in the git working index. This is because of the --plain option, which "Excludes metadata to maximise interoperability" and thus does not support empty directories (http://doc.bazaar.canonical.com/plugins/en/fastimport-plugin.html).

However, when I use "--no-plain" (which according to above documentation exports empty directories), git cannot handle it:

$ ./freeplane2git.sh Initialized empty Git repository in /home/felix/git/freeplane-git1/.git/ 15:56:09 Calculating the revisions to include ... 15:56:09 Starting export of 4290 revisions ... fatal: This version of fast-import does not support feature commit-properties. fast-import: dumping crash report to .git/fast_import_crash_3915 bzr: broken pipe

I already tried to hack bzr-fastimport's exporter.py so that it does not emit commit properties but emits empty directories but i was not successful.

So is there another way to preserve empty directories or shall I report a bug on bzr fast-export?

Many thanks in advance!
-- 
Felix Natter
Next: David Aguilar
Message 1 of 3 in “bzr->git: keep empty directories”
  1. Felix NatterJul 14, 2012
  2. David AguilarJul 14, 2012
  3. Steven MichalskeJul 15, 2012

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.