Git development
 help / color / mirror / Atom feed
From: Tyler Cipriani <tyler@tylercipriani.com>
To: git@vger.kernel.org
Cc: Srinidhi Kaushik <shrinidhi.kaushik@gmail.com>,
	Stefan Haller <lists@haller-berlin.de>,
	"D. Ben Knoble" <ben.knoble@gmail.com>,
	Phillip Wood <phillip.wood123@gmail.com>,
	Johannes Schindelin <Johannes.Schindelin@gmx.de>,
	Junio C Hamano <gitster@pobox.com>,
	Patrick Steinhardt <ps@pks.im>, Aleksei Sviridkin <f@lex.la>
Subject: Re: [PATCH v6 0/3] push: check pushed ref for --force-if-includes
Date: Mon, 5 Oct 2026 15:26:05 -0600	[thread overview]
Message-ID: <asQV7QpGglThldfD@localhost.localdomain> (raw)
In-Reply-To: <20260917224351.57171-1-tyler@tylercipriani.com>

Adding Patrick to CC, like I should've from v4 onwards. Whoops!

Patrick: to address your review, since v4, I no longer special-case HEAD
(as in v3), and, instead, resolve any passed source ref. Now, if the
source ref resolves to a branch, we check that branch's reflog for the
remote tip. But for any other source (e.g., tag, oid, detached HEAD), I
reject the push as unverifiable. I'd value your opinion on whether that
matches up with what you meant.

I'm rejecting anything other than a branch reflog as "unverifiable" as
other reflogs fail to record the integration info we need for
--force-if-includes. HEAD's reflog spans all branches (rejected in the
OG review, c. 2020), tag reflogs (when they exist) record where the tag
pointed. And while a source tag/oid may be the same oid as the tip of a
branch, using that to map a tag/oid to a branch seems specious: many
branches could point to the same commit with no way to say which
branch's reflog to check.

Ben and I have talked a bit about the consequences of rejecting
non-branch pushes with --force-if-includes, viz: it breaks workflows
that give the appearance of working today. For example, pushing
<tag>:hotfix is allowed today (if you have a local "hotfix" branch whose
reflog looks right), but --force-if-includes has never checked anything
about the tag. 3/3 lets fast-forward, non-branch pushes through; 2/3's
advice points to --force-with-lease=<ref>:<expect> for the rest.

Very interested in others' opinions about this tradeoff.

Note: Junio flagged a trivial textual conflict in t5533 with
as/push-force-if-includes-no-reflog: both topics add tests after the
same existing test.

There's a small conflict against the tip of maint now, too. a85a43c480
(push: suggest <remote> <branch> for a slash slip, 2026-06-27) adds some
advice that sorts alphabetically after my 2/3. Happy to send a rebased
v7 if that's helpful.

Thanks.

      parent reply	other threads:[~2026-10-05 21:26 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-04 21:01 [PATCH 0/2] push: fix --force-if-includes consulting wrong ref Tyler Cipriani
2026-09-04 21:01 ` [PATCH 1/2] push: check pushed ref for --force-if-includes Tyler Cipriani
2026-09-05 18:57   ` Ben Knoble
2026-09-04 21:01 ` [PATCH 2/2] push: fix --force-if-includes detached HEAD advice Tyler Cipriani
2026-09-05 18:59 ` [PATCH 0/2] push: fix --force-if-includes consulting wrong ref Ben Knoble
2026-09-06 20:24   ` Tyler Cipriani
2026-09-08 22:20 ` [PATCH v2 " Tyler Cipriani
2026-09-09 11:59   ` D. Ben Knoble
2026-09-08 22:20 ` [PATCH v2 1/2] push: check pushed ref for --force-if-includes Tyler Cipriani
2026-09-10 18:43   ` Junio C Hamano
2026-09-10 22:08     ` Tyler Cipriani
2026-09-08 22:20 ` [PATCH v2 2/2] push: fix --force-if-includes detached HEAD advice Tyler Cipriani
2026-09-10 23:05 ` [PATCH v3 0/2] push: fix --force-if-includes consulting wrong ref Tyler Cipriani
2026-09-10 23:05   ` [PATCH v3 1/2] push: check pushed ref for --force-if-includes Tyler Cipriani
2026-09-11  6:55     ` Patrick Steinhardt
2026-09-11 22:58       ` Tyler Cipriani
2026-09-11 15:31     ` Junio C Hamano
2026-09-11 23:47       ` Tyler Cipriani
2026-09-10 23:05   ` [PATCH v3 2/2] push: fix --force-if-includes detached HEAD advice Tyler Cipriani
2026-09-11  6:55     ` Patrick Steinhardt
2026-09-11 16:03       ` Junio C Hamano
2026-09-11 15:40     ` Junio C Hamano
2026-09-14  4:00 ` [PATCH v4 0/2] push: check pushed ref for --force-if-includes Tyler Cipriani
2026-09-14  4:00   ` [PATCH v4 1/2] " Tyler Cipriani
2026-09-14  4:00   ` [PATCH v4 2/2] push: fix --force-if-includes non-branch advice Tyler Cipriani
2026-09-14 13:03   ` [PATCH v4 0/2] push: check pushed ref for --force-if-includes D. Ben Knoble
2026-09-14 19:27     ` Tyler Cipriani
2026-09-14 20:52       ` D. Ben Knoble
2026-09-15 23:33 ` [PATCH v5 0/3] " Tyler Cipriani
2026-09-15 23:33   ` [PATCH v5 1/3] " Tyler Cipriani
2026-09-15 23:33   ` [PATCH v5 2/3] push: fix --force-if-includes non-branch advice Tyler Cipriani
2026-09-15 23:33   ` [PATCH v5 3/3] push: --force-if-includes should allow fast-forward Tyler Cipriani
2026-09-16 12:29     ` D. Ben Knoble
2026-09-16 15:52       ` Tyler Cipriani
2026-09-16 17:53         ` Ben Knoble
2026-09-17 22:43 ` [PATCH v6 0/3] push: check pushed ref for --force-if-includes Tyler Cipriani
2026-09-17 22:43   ` [PATCH v6 1/3] " Tyler Cipriani
2026-09-17 22:43   ` [PATCH v6 2/3] push: fix --force-if-includes non-branch advice Tyler Cipriani
2026-09-17 22:43   ` [PATCH v6 3/3] push: --force-if-includes should allow fast-forward Tyler Cipriani
2026-10-05 21:26   ` Tyler Cipriani [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=asQV7QpGglThldfD@localhost.localdomain \
    --to=tyler@tylercipriani.com \
    --cc=Johannes.Schindelin@gmx.de \
    --cc=ben.knoble@gmail.com \
    --cc=f@lex.la \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=lists@haller-berlin.de \
    --cc=phillip.wood123@gmail.com \
    --cc=ps@pks.im \
    --cc=shrinidhi.kaushik@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox