Re: [PATCH] Skip writing out sha1 files for objects in packed git.
- From
Linus Torvalds <torvalds@osdl.org>
- Date
- Jun 28, 2005, 02:43 UTC
- Message-ID
- <Pine.LNX.4.58.0506271935260.19755@ppc970.osdl.org>
- In-Reply-To
- <7vr7eni6fy.fsf_-_@assigned-by-dhcp.cox.net>
On Mon, 27 Jun 2005, Junio C Hamano wrote:
Show 8 quoted lines
> > Now, there's still a misfeature there, which is that when you > create a new object, it doesn't check whether that object > already exists in the pack-file, so you'll end up with a few > recent objects that you really don't need (notably tree > objects), and this patch fixes it. > > Signed-off-by: Junio C Hamano <junkio@cox.net>
Actually, I don't think that "do_expand" flag should exist.
If we want to expand a packed file and really write the objects to the .git/objects directories, we should just not have that packed file in the .git/objects/pack directory.
And if we have a pack-file in .git/objects/ that already has the object, that may not be the _same_ pack-file that we're expanding at all, so if that pack file already has the object, then not writing it out is actually the right thing to do.
That will also simplify your patch a bit. I'll fix it up.
Linus