Re: [PATCH 1/3] repository: create disable_replace_refs()
- From
Jeff King <peff@peff.net>
- Date
- Jun 4, 2023, 06:32 UTC
- Message-ID
- <20230604063206.GB47137@coredump.intra.peff.net>
- In-Reply-To
- <xmqqa5xh8k4i.fsf@gitster.g>
On Sat, Jun 03, 2023 at 09:28:13AM +0900, Junio C Hamano wrote:
Show 13 quoted lines
> I agree with the "devil's advocate" above; indeed my suggestion to > follow-on work that is enabled by introducing this function, i.e. we > can ensure that the objects already instantiated when the call is > made are not affected by the replace mechanism, was exactly for such > a "we already accessed some objects via the replace mechanism and > then try to close the door of the barn afterwards with this call" > case. > > Indeed, I think "git branch --no-merged 0369cf" resolves the object > name down to a commit object in parse_opt_merge_filter() before > parse_options() call returns. > > Yes.
Ah, very good example. Yes, I'd think it would be appropriate to BUG() if disable_replace_refs() is called and anybody has looked up an object already.
-Peff