Re: Pruning objects from history?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




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
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]