git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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!
Previous: Ben KnobleNext: Tyler Cipriani
Message 6 of 40 in “push: fix --force-if-includes consulting wrong ref”
  1. 0/2 push: fix --force-if-includes consulting wrong refTyler Cipriani, Sep 4, 2026
  2. 1/2 push: check pushed ref for --force-if-includesTyler Cipriani, Sep 4, 2026
  3. 2/2 push: fix --force-if-includes detached HEAD adviceTyler Cipriani, Sep 4, 2026
  4. Ben KnobleSep 5, 2026
  5. Ben KnobleSep 5, 2026
  6. Tyler CiprianiSep 6, 2026
  7. 0/2 push: fix --force-if-includes consulting wrong refTyler Cipriani, Sep 8, 2026
  8. 1/2 push: check pushed ref for --force-if-includesTyler Cipriani, Sep 8, 2026
  9. 2/2 push: fix --force-if-includes detached HEAD adviceTyler Cipriani, Sep 8, 2026
  10. D. Ben KnobleSep 9, 2026
  11. Junio C HamanoSep 10, 2026
  12. Tyler CiprianiSep 10, 2026
  13. 0/2 push: fix --force-if-includes consulting wrong refTyler Cipriani, Sep 10, 2026
  14. 1/2 push: check pushed ref for --force-if-includesTyler Cipriani, Sep 10, 2026
  15. 2/2 push: fix --force-if-includes detached HEAD adviceTyler Cipriani, Sep 10, 2026
  16. Patrick SteinhardtSep 11, 2026
  17. Patrick SteinhardtSep 11, 2026
  18. Junio C HamanoSep 11, 2026
  19. Junio C HamanoSep 11, 2026
  20. Junio C HamanoSep 11, 2026
  21. Tyler CiprianiSep 11, 2026
  22. Tyler CiprianiSep 11, 2026
  23. 0/2 push: check pushed ref for --force-if-includesTyler Cipriani, Sep 14, 2026
  24. 1/2 push: check pushed ref for --force-if-includesTyler Cipriani, Sep 14, 2026
  25. 2/2 push: fix --force-if-includes non-branch adviceTyler Cipriani, Sep 14, 2026
  26. D. Ben KnobleSep 14, 2026
  27. Tyler CiprianiSep 14, 2026
  28. D. Ben KnobleSep 14, 2026
  29. 0/3 push: check pushed ref for --force-if-includesTyler Cipriani, Sep 15, 2026
  30. 1/3 push: check pushed ref for --force-if-includesTyler Cipriani, Sep 15, 2026
  31. 2/3 push: fix --force-if-includes non-branch adviceTyler Cipriani, Sep 15, 2026
  32. 3/3 push: --force-if-includes should allow fast-forwardTyler Cipriani, Sep 15, 2026
  33. D. Ben KnobleSep 16, 2026
  34. Tyler CiprianiSep 16, 2026
  35. Ben KnobleSep 16, 2026
  36. 0/3 push: check pushed ref for --force-if-includesTyler Cipriani, Sep 17, 2026
  37. 1/3 push: check pushed ref for --force-if-includesTyler Cipriani, Sep 17, 2026
  38. 2/3 push: fix --force-if-includes non-branch adviceTyler Cipriani, Sep 17, 2026
  39. 3/3 push: --force-if-includes should allow fast-forwardTyler Cipriani, Sep 17, 2026
  40. Tyler CiprianiOct 5, 2026

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.