From 5caa7b302a7d4f247aaa7cc688a692aac4486464 Mon Sep 17 00:00:00 2001 From: Lorenz Leutgeb Date: Thu, 2 Oct 2025 09:44:04 +0200 Subject: [PATCH] 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. --- crates/radicle-remote-helper/src/push.rs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/crates/radicle-remote-helper/src/push.rs b/crates/radicle-remote-helper/src/push.rs index 8b907c5d..0a86d519 100644 --- a/crates/radicle-remote-helper/src/push.rs +++ b/crates/radicle-remote-helper/src/push.rs @@ -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); }