remote-helper: Check base when matching revisions

It is impossible to preserve the head of a revision and only change
the base of same revision via push.

Strenghthen the precondition for skipping updates to also consider the
base commit.
This commit is contained in:
Lorenz Leutgeb 2025-10-02 09:44:04 +02:00 committed by Fintan Halpenny
parent 9bb136105c
commit 5caa7b302a
1 changed files with 5 additions and 2 deletions

View File

@ -692,8 +692,11 @@ where
let base = patch_base(head, &opts, stored)?;
// Don't update patch if it already has a revision matching this commit.
if patch.revisions().any(|(_, r)| r.head() == *head) {
// Don't update patch if it already has a matching revision.
if patch
.revisions()
.any(|(_, r)| r.head() == *head && *r.base() == base)
{
return Ok(None);
}