Git development
 help / color / mirror / Atom feed
From: Tyler Cipriani <tyler@tylercipriani.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org
Subject: Re: What's cooking in git.git (Nov 2026, #02)
Date: Thu, 5 Nov 2026 11:07:24 -0700	[thread overview]
Message-ID: <auzF3FvY8ahutXw7@localhost.localdomain> (raw)
In-Reply-To: <xmqqmrroxdzs.fsf@gitster.g>

On 26-11-04 17:29:11, Junio C Hamano wrote:
>* tc/push-force-if-includes-fixes (2026-10-18) 3 commits
> - push: --force-if-includes should allow fast-forward
> - push: fix --force-if-includes non-branch advice
> - push: check pushed ref for --force-if-includes
>
> The '--force-if-includes' protection for 'git push' has been updated
> to consult the reflog of the local branch being pushed, rather than
> incorrectly checking the reflog of a local branch that shares the name
> of the remote destination branch.  The push advice for detached HEAD
> scenarios has also been adjusted to indicate that the remote ref
> cannot be verified locally.  A regression that caused perfectly valid
> fast-forward pushes to be rejected when reflogs were expired has been
> fixed.
>
> Needs review.
> source: <20261018203255.2343005-1-tyler@tylercipriani.com>

One note nit here: --force-if-includes rejecting fast-forward is not a
regression. It's been a bug since the flag was introduced in 3b990aa645
(push: parse and set flag for "--force-if-includes", 2020-10-03).

That is, this has always been rejected:

    git init --bare r.git && git clone r.git wt && cd wt
    git commit --allow-empty -m A
    git push origin main
    git commit --allow-empty -m B
    git reflog expire --expire=all main
    git push --force-with-lease --force-if-includes origin main

      parent reply	other threads:[~2026-11-05 18:07 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-05  1:29 What's cooking in git.git (Nov 2026, #02) Junio C Hamano
2026-11-05  7:29 ` Tuomas Ahola
2026-11-05 18:07 ` 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=auzF3FvY8ahutXw7@localhost.localdomain \
    --to=tyler@tylercipriani.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.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