node: Get the failing fetch tests passing

We fix the failing fetch tests by:

1. Not verifying our own refs, unless we're cloning, since we're
   otherwise not fetching our own refs.
2. Always force-fetching `sigrefs` from remotes into the staging copy.
3. Making sure that sigref updates are fast-forward before transfering
   the remote into the production copy.
This commit is contained in:
Alexis Sellier
2023-05-03 16:16:34 +02:00
parent 1326774d4f
commit 0886ab0a3c
6 changed files with 137 additions and 50 deletions
+2 -1
View File
@@ -229,7 +229,8 @@ impl Worker {
namespaces: &Namespaces,
mut channels: Channels,
) -> Result<(Vec<RefUpdate>, HashSet<NodeId>), FetchError> {
let staging = fetch::StagingPhaseInitial::new(&self.storage, rid, namespaces.clone())?;
let staging =
fetch::StagingPhaseInitial::new(&self.storage, rid, self.nid, namespaces.clone())?;
let refs = if staging.repo.is_cloning() {
match self._fetch(
&staging.repo,