Skip to content

repository: Add tests for F/D conflicts in FetchRemote

Karthik Nayak requested to merge kn-4389-repo-mirroring-df-conflicts-2 into master

When fetching refs from a source, there is a potential F/D conflict which can occur. Consider the following:

  1. Source => {refs: ["refs/heads/branch": commit1]}
  2. Mirror => {refs: ["refs/heads/branch/conflict": commit2]}

When we pull the refs from the source to the mirror, there is potential scenario where there is a F/D conflict.

In FetchRemote we prune refs before fetching, unless NoPrune option is specified. Because of this, there is no F/D conflict occuring by default.

Add tests to validate this behavior and codify it.

Part of #4389 (closed)

Merge request reports