Re: [RFC/PATCH 3/7] replace_object: add mechanism to replace objects found in "refs/replace/"
- From
Christian Couder <chriscool@tuxfamily.org>
- Date
- Jan 15, 2009, 17:40 UTC
- Message-ID
- <200901151840.12511.chriscool@tuxfamily.org>
- In-Reply-To
- <200901151044.45967.chriscool@tuxfamily.org>
Le jeudi 15 janvier 2009, Christian Couder a écrit :
Show 17 quoted lines
> Le mardi 13 janvier 2009, Junio C Hamano a écrit : > > > Since your paradigm is prepare replacement once at the beginning, never > > allowing to update it, I think you can update the table while you look > > it up. E.g. if A->B and B->C exists, and A is asked for, you find A->B > > (to tentatively make cur to point at B) and then you find B->C, and > > before returning you can rewrite the first mapping to A->C. Later > > look-up won't need to dereference the table twice that way. > > > > This assumes that there will be small number of replacements, but the > > same object can be asked for more than once during the process. > > If we allow different sets of replace refs, for example A->B > in "refs/replace/" and B->C in "refs/replace/bisect/", then we cannot > rewrite as you suggest. We could add A->C in "refs/replace/bisect/", so > that it overcomes A->B and B->C when we bisect, but we would not gain > much.
Sorry, I just realized I misunderstood what you said. I don't know why but I thought you talked about updating the refs. But in fact you are right it should be possible to update the "replace_object" table.
Regards, Christian.