From: Sam Vilain <sam@vilain.net>
To: Jeff King <peff@peff.net>
Cc: git@vger.kernel.org
Subject: Re: rewriting pathnames in history
Date: Wed, 22 Feb 2006 09:54:54 +1300 [thread overview]
Message-ID: <43FB7E1E.6070605@vilain.net> (raw)
In-Reply-To: <20060221075342.GA13814@coredump.intra.peff.net>
Jeff King wrote:
> I recently ran into an interesting situation with git. I created a
> repository that consisted of several directories (and files in them).
> Later, after many commits, I realized I would prefer each directory have
> its own git repository. That is, given a repo with the files:
> foo/bar
> baz/bleep
> I wanted two repos, "foo" containing the file "bar" and "baz" containing
> the file "bleep".
Nice work, but I think you should be able to get it *really* fast, much
faster than that.
Instead of replaying a checked out copy, just go through the commit
history, and when the treeID for that subdirectory has changed, then
that directory has a new revision. So, make a new commit object with
that as the treeid. in other words, you'll be constructing a very
lightweight branch, but with its tree IDs all corresponding to
sub-directory treeids on the combined branch. The history ripple script
that was posted the other day probably has most of the pieces you need.
Once this is done, you can just clone that branch to "get it out".
Sam.
prev parent reply other threads:[~2006-02-21 20:55 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-02-21 7:53 rewriting pathnames in history Jeff King
2006-02-21 20:54 ` Sam Vilain [this message]
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=43FB7E1E.6070605@vilain.net \
--to=sam@vilain.net \
--cc=git@vger.kernel.org \
--cc=peff@peff.net \
/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