{"thread":{"id":"25716","subject":"Re: git-fast-export issue?","startedAt":"2010-11-11T18:55:34Z","lastAt":"2010-11-11T18:55:34Z","messageCount":1,"participants":["Shawn Pearce"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"155727","messageId":"AANLkTinpLGsRXdPwO4E7AB4yyt-G5eWBtCcWKrJy2A6n@mail.gmail.com","threadId":"25716","inReplyTo":"20101111080930.66e2fb21@atmarama.noip.me","subject":"Re: git-fast-export issue?","fromName":"Shawn Pearce","fromEmail":"spearce@spearce.org","sentAt":"2010-11-11T18:55:34Z","receivedAt":"2010-11-11T18:55:34Z","isPatch":false,"sender":{"key":"spearce@spearce.org","avatar":"https://avatars.githubusercontent.com/u/34844?v=4"},"body":"+git mailing list\n\nOn Wed, Nov 10, 2010 at 11:09 PM, Gour <gour@atmarama.net> wrote:\n> On Wed, 10 Nov 2010 20:53:31 -0500\n>>>>>>> \"Richard\" == Richard Hipp wrote:\n>\n> Richard> Gour:  The git fast-export manpage says that Shawn O. Pearce,\n> Richard> CCed on this email, is the author and maintainer of\n> Richard> git-fast-export.  I'm including him in the conversation in the\n> Richard> hopes that he can shed some light on this issue.\n\nI'm not actually the maintainer of git fast-export.  I don't know\nwhere that came from.  Maybe its because I wrote and maintained git\nfast-import for a few years?\n\n> Richard> M 100644 :938 emacs/emacs-custom.el\n...\n> Richard> M 100644 :1075 emacs/emacs.rc\n> Richard> D emacs\n\nThis looks like a mistake by `git fast-export --all`.  The D emacs\nneeded to come *before* the M commands that put files into the\ndirectory.  But it was emit afterwards.  I'm not sure why.\n\n> Richard> According to my reading of the manpage at\n> Richard> http://www.kernel.org/pub/software/scm/git/docs/git-fast-export.html\n> Richard> the \"D emacs\" line above should delete the \"emacs\" folder and\n> Richard> all of its contents. Clearly my understanding is wrong,\n> Richard> though, since Git doesn't actually do that, and why would it\n> Richard> change files in that directory prior to deleting them?  But\n> Richard> the \"fossil import\" command is currently coded to do what I\n> Richard> understand the documentation says it should do - which is to\n> Richard> delete the content of the \"emacs\" folder.  A subsequent commit\n> Richard> adds the file emacs/emacs.rc which is why the folder still\n> Richard> exists in the tip.\n> Richard>\n> Richard> I'm really perplexed about that D line.\n>\n> The above D line says, according to my understanding based on the\n> actions I did on the repo, to remove emacs *file*.\n>\n> it was caused by one of the darcs features called 'rename' which darcs\n> does quite good.\n>\n> Here is what I did.\n>\n> I've created emacs *folder* and put emacs-* files into it, renamed\n> emacs into emacs.rc and moved into into emacs/emacs.rc.\n\nOK.  In this case \"D emacs, M emacs/emacs.rc\" makes sense if you\nrenamed \"emacs\" to \"emacs/emacs.rc\".  Unfortunately git fast-export\nwrote the commands in the wrong order.  The fast-import stream\nlanguage executes the file commands in the order they appear on the\nstream, as though it was updating a real filesystem.  This can be\nawkward to use sometimes when changing a file to become a directory.\n\nBased on what you said above, the stream is broken, and you can't fix\nit in the importer that is trying to read it.  git fast-export should\nhave put \"D emacs\" first in the stream, not last.\n\n-- \nShawn.\n"}]}