Re: [PATCH 0/2] push: fix --force-if-includes consulting wrong ref
- From
Tyler Cipriani <tyler@tylercipriani.com>
- Date
- Sep 6, 2026, 20:24 UTC
- Message-ID
- <CAHLx=O=tVhtiZpaRP9TpfiBfOMS2xPe3c3=mC3VNEdBrLOioFg@mail.gmail.com>
- In-Reply-To
- <D798198C-5F97-4701-9050-7868B6482214@gmail.com>
On Sat, Sep 5, 2026 at 12:59 PM Ben Knoble <ben.knoble@gmail.com> wrote:
> Thanks for the advice changes! One small nit on the first > patch you can ignore if you choose.
Good call on updating the log message for PATCH 1/2. I'll note that detached HEAD is already rejected in v2.
Show 6 quoted lines
> At first I hoped we might be able to stop rejecting detached > HEAD pushes, but some further thought begs the question: > what reflog would we use? > HEAD’s is too broad :) > > So this may be all we can do for now.
It looks like that's the conclusion they reached on the original patchset, too, based on my re-reading of the thread[0]. HEAD's reflog is too broad for the --force-if-includes check (with the acknowledged downside being that --force-if-includes isn't useful for the detached HEAD case.)
[0]: <https://lore.kernel.org/git/xmqqsgbdk69b.fsf@gitster.c.googlers.com/>
> At least I can replace my intuition with reading the error message again.
:)
Thank you for the review!