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:
parent
9bb136105c
commit
5caa7b302a
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue