From: "David Frech" <nimblemachines@gmail.com>
To: "Shawn O. Pearce" <spearce@spearce.org>
Cc: git@vger.kernel.org
Subject: Re: [PATCH] Support wholesale directory renames in fast-import
Date: Mon, 9 Jul 2007 21:16:41 -0700 [thread overview]
Message-ID: <7154c5c60707092116p70aaeb8l90cda9265311b999@mail.gmail.com> (raw)
In-Reply-To: <20070710031036.GA9045@spearce.org>
This should do nicely! Thank you!
Now my challenge is that the svn dump doesn't *actually* say "rename
a/ to b/"; it says "copy a/ to b/; delete a/", so I have to infer the
rename.
But your patch makes my import possible, and it wasn't before!
Cheers,
- David
On 7/9/07, Shawn O. Pearce <spearce@spearce.org> wrote:
> Some source material (e.g. Subversion dump files) perform directory
> renames without telling us exactly which files in that subdirectory
> were moved. This makes it hard for a frontend to convert such data
> formats to a fast-import stream, as all the frontend has on hand
> is "Rename a/ to b/" with no details about what files are in a/,
> unless the frontend also kept track of all files.
>
> The new 'R' subcommand within a commit allows the frontend to
> rename either a file or an entire subdirectory, without needing to
> know the object's SHA-1 or the specific files contained within it.
> The rename is performed as efficiently as possible internally,
> making it cheaper than a 'D'/'M' pair for a file rename.
>
> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
> ---
>
> David Frech <david@nimblemachines.com> wrote:
> > Git can track file renames implicitly. If I delete and then add (under
> > a different name) the same content, git will figure that out.
> >
> > But if a directory was renamed, I have no way to tell fast-import
> > about it. I can't delete the directory (using a 'D' command) and then
> > add it back (with a different name) with all its contents, because my
> > source material (an svn dump file) doesn't tell me, at that point,
> > about all the files involved because nothing about them has changed.
> >
> > fast-import knows about the contents of the directory I want to
> > rename, but doesn't give me a primitive to do the rename. Is this
> > something we need to add? My frontend could keep track of this, but I
> > would duplicating work that fast-import is already doing.
>
> Does the following do the trick for you? It is also available
> from my fastimport.git master branch:
>
> git://repo.or.cz/git/fastimport.git master
> http://repo.or.cz/r/git/fastimport.git master
>
> Yes, it passes all tests...
>
[patch elided]
next prev parent reply other threads:[~2007-07-10 4:16 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-07-10 1:09 how to do directory renames in fast-import David Frech
2007-07-10 3:10 ` [PATCH] Support wholesale " Shawn O. Pearce
2007-07-10 4:16 ` David Frech [this message]
2007-07-10 14:03 ` Uwe Kleine-König
2007-07-10 14:14 ` Shawn O. Pearce
2007-07-10 19:55 ` David Frech
2007-07-11 7:57 ` Shawn O. Pearce
2007-07-11 23:11 ` David Frech
2007-07-10 8:44 ` Rogan Dawes
2007-07-10 13:55 ` Shawn O. Pearce
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=7154c5c60707092116p70aaeb8l90cda9265311b999@mail.gmail.com \
--to=nimblemachines@gmail.com \
--cc=git@vger.kernel.org \
--cc=spearce@spearce.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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 NNTP newsgroup(s).