Re: [PATCH v3 1/7] remote: add reflog check for "force-if-includes"
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Sep 14, 2020, 20:31 UTC
- Message-ID
- <xmqq5z8gje18.fsf@gitster.c.googlers.com>
- In-Reply-To
- <20200913145413.18351-2-shrinidhi.kaushik@gmail.com>
Srinidhi Kaushik <shrinidhi.kaushik@gmail.com> writes:
> The struct "ref" has three new bit-fields: > * if_includes: Set when we have to run the new check on the ref. > * is_tracking: Set when the remote ref was marked as "use_tracking" > or "use_tracking_for_rest" by compare-and-swap.
... meaning that --force-with-lease with an explicit "the tip must still be at this exact commit" won't use the extra check to loosen the condition? That sounds sensible.
> * unreachable: Set if the ref is unreachable from any of the "reflog" > entries of its local counterpart.
The same comment applies on "reflog of which branch should we check"; I suspect that checking HEAD and without checking merge base may prove to be a good way to go.
> + */ > +void apply_push_force_if_includes(struct ref*, int);
SP between ref and '*'?