git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* Re: git-fast-export issue?
       [not found] ` <20101111080930.66e2fb21@atmarama.noip.me>
@ 2010-11-11 18:55   ` Shawn Pearce
  0 siblings, 0 replies; only message in thread
From: Shawn Pearce @ 2010-11-11 18:55 UTC (permalink / raw
  To: Gour; +Cc: Richard Hipp, git

+git mailing list

On Wed, Nov 10, 2010 at 11:09 PM, Gour <gour@atmarama.net> 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.

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2010-11-11 18:56 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <AANLkTikVVH6SP+bQhU9e2B0h4k0t9ma+2cNkzuNvCDgo@mail.gmail.com>
     [not found] ` <20101111080930.66e2fb21@atmarama.noip.me>
2010-11-11 18:55   ` git-fast-export issue? Shawn Pearce

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).