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-03 11:30:22 +01:00
committed by Fintan Halpenny
parent 9bb136105c
commit 5caa7b302a
+5 -2
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);
}