Re: [JGIT PATCH 09/21] Remember how a Ref was read in from disk and created
- From
Shawn O. Pearce <spearce@spearce.org>
- Date
- Jun 29, 2008, 18:00 UTC
- Message-ID
- <20080629180029.GG11793@spearce.org>
- In-Reply-To
- <alpine.DEB.1.00.0806291516540.9925@racer>
Johannes Schindelin <Johannes.Schindelin@gmx.de> wrote:
Show 16 quoted lines
> On Sun, 29 Jun 2008, Robin Rosenberg wrote: > > > söndagen den 29 juni 2008 09.59.19 skrev Shawn O. Pearce: > > > To efficiently deleted or update a ref we need to know where it came > > > from when it was read into the process. If the ref is being updated > > > we can usually just write the loose file, but if it is being deleted > > > we may need to remove not just a loose file but also delete it from > > > the packed-refs. > > > > One could argue that we should not normally just delete a ref, but mark > > it as deleted and let git gc delete it when it expires, just like any > > old ref, but then we should try to get C Git to do the same. There was a > > thread relating to this recently. > > ... but it petered out, so you should consider any ideas in that thread > rejected.
Right. Its a nice idea, but until there is a really solid agreement in the community about how this should be stored on disk, I don't want to try and implement it in jgit, or in C Git for that matter. And I don't really care enough to come up with something and reopen the thread myself.
I just realized that the dumb transport push support doesn't delete the reflog when it deletes the ref. Whoops. That's a problem if you later try to create a ref where a directory used to be. Either git will run into errors trying to create the reflog.
-- Shawn.