git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Alex Bennee" <kernel-hacker@bennee.com>
To: "Avery Pennarun" <apenwarr@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: Truncating and cleaning a imported git repositary to make it more usable
Date: Fri, 28 Mar 2008 13:08:05 +0000	[thread overview]
Message-ID: <b2cdc9f30803280608y501147c0tc02f43196bda4bf7@mail.gmail.com> (raw)
In-Reply-To: <32541b130803280550u2ed23b5auc84bf935d5344e84@mail.gmail.com>

On Fri, Mar 28, 2008 at 12:50 PM, Avery Pennarun <apenwarr@gmail.com> wrote:
> On 3/28/08, Alex Bennee <kernel-hacker@bennee.com> wrote:
>  >  I've succeeded in porting our whole CVS repository into git (with plenty
>  >  of swap, cvsps is very memory hungry). Now we have a reference
>  >  historical repository I need to think about creating one we actually use
>  >  for day to day use (the .git is currently in the order of 650Mb which is
>  >  a little heavy for pushing around DSL links willy nilly).
>
>  You used git-repack and git-gc, right?  If not, the repo will be
>  bigger than it should be.

Oh yes. Unfortunately for 7 years of development of an embedded
platform there is a lot of cruft in the CVS repo :-(.

However as it needs to be a drop in replacement for the current repo
we can't just drop all the history and start from a fresh repo.

>  >  1. Find the common ancestor point for all the product branches I want to
>  >  keep in the repo.

>  "git show-branch -a" probably does what you want.

Cool. Or in fact git-show-branch --merge-base seems to be the baby.

I'm sure it's been mentioned before but the plethora of git commands
can make it hard to find the commands you want even
if your sure there is some way of doing it :-)

>  >  2. Create a new repo, starting at the common ancestor point
>  >
>  >   2(a). I'd need to remove the orphaned old CVS modules which are still
>  >  around but not referenced any more.
>  >
>  >  3. Create the product branches and import ANCESTOR..BRANCH_HEAD into
>  >  them
>
>  You probably want to look at git-filter-branch, particularly the
>  --parent-filter option.
>
>  Note that 2(a) would be easiest if you just did it before importing
>  from CVS at all, since it's easy to remove old modules from CVS just
>  by moving the files out of the way.

Trouble is looking at the current repo I'm not sure which modules are
orphans (at the common anscestor point) and which have been added
since.

Of course now I can easily go back in time (easier than in CVS) I can
build up this list.

>  Have fun,

For certain values of fun ;-)

-- 
Alex, homepage: http://www.bennee.com/~alex/

  reply	other threads:[~2008-03-28 13:08 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-03-28 12:35 Truncating and cleaning a imported git repositary to make it more usable Alex Bennee
2008-03-28 12:50 ` Avery Pennarun
2008-03-28 13:08   ` Alex Bennee [this message]
2008-03-28 15:52   ` Alex Bennee
2008-03-28 16:03     ` Alex Bennee
2008-03-28 16:43       ` Johannes Sixt
2008-03-28 18:07         ` [PATCH] Documentation: Another example for git-filter-branch Alex Bennee
2008-03-28 20:44         ` Truncating and cleaning a imported git repositary to make it more usable Mike Hommey
2008-03-29 13:47         ` Alex Bennee
2008-03-29 14:30           ` Jakub Narebski
2008-03-31  6:17           ` Johannes Sixt
2008-03-28 18:08       ` Jeff King
2008-03-28 18:19         ` Jeff King
2008-03-29 17:51 ` Michael Haggerty

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=b2cdc9f30803280608y501147c0tc02f43196bda4bf7@mail.gmail.com \
    --to=kernel-hacker@bennee.com \
    --cc=apenwarr@gmail.com \
    --cc=git@vger.kernel.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).