radicle-dev / radicle-link

The second iteration of the Radicle code collaboration protocol.
Other
421 stars 39 forks source link

Replicating when `rere` is enabled with patched libgit fails to replicate sigrefs #726

Closed alexjg closed 3 years ago

alexjg commented 3 years ago

The following steps (which are reproduced in the rere_tracked test on #725 ) causes a problem:

  1. Create a testnet with two peers, peer1, and peer2
  2. Make peer1 track peer2
  3. Create a project in peer1s storage
  4. Create a commit in the project as peer1, point refs/heads/master at it
  5. Pull the project from peer1 to peer2
  6. Create a commit in peer2, point refs/heads/master at it
  7. Pull the project from peer2 into peer1
  8. Assert that the reference refs/namespaces/<project>/refs/remotes/<Peer 2>/heads/master exists in peer1s storage.

This fails if rere is enabled with the patched libgit which respects the force flag on fetchspecs, or equivalently/ if we set the force flag on the peek fetchspec in librad::git::types::refspec::peek() to Force::True (therefore I don't think this is a correctness problem with libgit).