+git mailing list On Wed, Nov 10, 2010 at 11:09 PM, Gour <gour@xxxxxxxxxxxx> wrote: > On Wed, 10 Nov 2010 20:53:31 -0500 >>>>>>> "Richard" == Richard Hipp wrote: > > Richard> Gour: The git fast-export manpage says that Shawn O. Pearce, > Richard> CCed on this email, is the author and maintainer of > Richard> git-fast-export. I'm including him in the conversation in the > Richard> hopes that he can shed some light on this issue. I'm not actually the maintainer of git fast-export. I don't know where that came from. Maybe its because I wrote and maintained git fast-import for a few years? > Richard> M 100644 :938 emacs/emacs-custom.el ... > Richard> M 100644 :1075 emacs/emacs.rc > Richard> D emacs This looks like a mistake by `git fast-export --all`. The D emacs needed to come *before* the M commands that put files into the directory. But it was emit afterwards. I'm not sure why. > Richard> According to my reading of the manpage at > Richard> http://www.kernel.org/pub/software/scm/git/docs/git-fast-export.html > Richard> the "D emacs" line above should delete the "emacs" folder and > Richard> all of its contents. Clearly my understanding is wrong, > Richard> though, since Git doesn't actually do that, and why would it > Richard> change files in that directory prior to deleting them? But > Richard> the "fossil import" command is currently coded to do what I > Richard> understand the documentation says it should do - which is to > Richard> delete the content of the "emacs" folder. A subsequent commit > Richard> adds the file emacs/emacs.rc which is why the folder still > Richard> exists in the tip. > Richard> > Richard> I'm really perplexed about that D line. > > The above D line says, according to my understanding based on the > actions I did on the repo, to remove emacs *file*. > > it was caused by one of the darcs features called 'rename' which darcs > does quite good. > > Here is what I did. > > I've created emacs *folder* and put emacs-* files into it, renamed > emacs into emacs.rc and moved into into emacs/emacs.rc. OK. In this case "D emacs, M emacs/emacs.rc" makes sense if you renamed "emacs" to "emacs/emacs.rc". Unfortunately git fast-export wrote the commands in the wrong order. The fast-import stream language executes the file commands in the order they appear on the stream, as though it was updating a real filesystem. This can be awkward to use sometimes when changing a file to become a directory. Based on what you said above, the stream is broken, and you can't fix it in the importer that is trying to read it. git fast-export should have put "D emacs" first in the stream, not last. -- Shawn. -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html