From: Junio C Hamano Date: Tue, 29 Sep 2026 16:54:46 GMT Subject: Re: [PATCH v4] push: fix --force-if-includes when remote-tracking ref has no reflog Message-ID: In-Reply-To: <20260929091319.86392-1-f@lex.la> Aleksei Sviridkin writes: > Changes since v3: > > - log message rewritten. Two things in it were wrong, not just > unclear: it read as if a walk that stops at the cut-off skips the > merge-base check, and it said there is "no such moment" when what is > missing is the record of it. > - test uses setup_src_dup_dst and expires only the remote-tracking > reflog. Both changes look sensible. Thanks, Aleksei and Tyler, for writing and reviewing. Will replace and mark it for 'next'. > +test_expect_success '"--force-if-includes" should allow forced update when remote-tracking ref has no reflog' ' > + setup_src_dup_dst && > + test_when_finished "rm -fr dst src dup" && > + ( > + cd src && > + git switch branch && > + git pull --rebase origin branch && > + # the bug needs a remote-tracking ref with no reflog, and > + # the fetch above wrote one > + git reflog expire --expire=all refs/remotes/origin/branch && > + git reset --hard HEAD^ && > + test_commit I && > + git push --force-if-includes --force-with-lease="branch" > + ) > +' > + > test_done