git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Linus Torvalds <torvalds@linux-foundation.org>
To: Theodore Tso <tytso@mit.edu>
Cc: Steven Grimm <koreth@midwinter.com>, git@vger.kernel.org
Subject: Re: Pruning objects from history?
Date: Sat, 31 Mar 2007 09:18:32 -0700 (PDT)	[thread overview]
Message-ID: <Pine.LNX.4.64.0703310913350.6730@woody.linux-foundation.org> (raw)
In-Reply-To: <20070331131134.GC25539@thunk.org>



On Sat, 31 Mar 2007, Theodore Tso wrote:
> 
> It's painful to rewrite history, since you end up needing to rewrite
> every single commit after the point where you've tampered with time to
> fix up the parent commit ID.

Well, if you don't ever need to actually rewrite blob objects, and many of 
the trees end up being the same, history rewriting is actually pretty 
cheap. If it mostly just has to rewrite the commits and a few trees, you 
end up having (even for big projects) just a few hundred thousand easy 
objects to rewrite. It's going to take a minute or two at most.

"git-convert-objects" has most of the logic, so some trivial added code to 
"convert" tree objects by removing certain entries should just do it. But 
yeah, it would involve some real changes. cg-admin-rewritehist should be 
able to do it already, although I suspect it would be slower (but for a 
one-shot thing, nobody probably cares, and changing convert-objects is 
probably going to take more time than just running the rewritehist 
scripts).

> If you just want to do a one-way import, it's probably going to be
> much easier to modify whatever importer you use to not import the big
> files in the first place.

I'd actually like cg-admin-rewritehist to be merged into git. I think it's 
one of the few things that cogito does that native git doesn't do.

		Linus

      reply	other threads:[~2007-03-31 16:18 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-03-31  2:01 Pruning objects from history? Steven Grimm
2007-03-31  2:08 ` Shawn O. Pearce
2007-03-31 13:11 ` Theodore Tso
2007-03-31 16:18   ` Linus Torvalds [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=Pine.LNX.4.64.0703310913350.6730@woody.linux-foundation.org \
    --to=torvalds@linux-foundation.org \
    --cc=git@vger.kernel.org \
    --cc=koreth@midwinter.com \
    --cc=tytso@mit.edu \
    /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).