test(rev_store): tip negotiation serves unrelated references#13672
Open
Alizter wants to merge 1 commit intoocaml:mainfrom
Open
test(rev_store): tip negotiation serves unrelated references#13672Alizter wants to merge 1 commit intoocaml:mainfrom
Alizter wants to merge 1 commit intoocaml:mainfrom
Conversation
Signed-off-by: Ali Caglayan <alizter@gmail.com>
Collaborator
Leonidas-from-XIV
left a comment
There was a problem hiding this comment.
Nice test; it's rather nice that we can get this tested despite this going through git!
I have one question and one suggestion for improvement.
| let unrelated_git = Git_test_utils.git ~dir:unrelated_repo_dir in | ||
| let* () = | ||
| git_init_and_config_user unrelated_repo_dir | ||
| >>> unrelated_git [ "config"; "uploadpack.allowAnySHA1InWant"; "true" ] |
Collaborator
There was a problem hiding this comment.
Could you add a comment why this is necessary? I don't really understand why we need this config line so a quick explanation would be helpful to any readers.
| [%expect {| Negotiation 'have' lines sent: 3 |}] | ||
| already has, avoiding redundant downloads. The count includes refs from | ||
| the unrelated remote. *) | ||
| [%expect {| Negotiation 'have' lines sent: 4 |}] |
Collaborator
There was a problem hiding this comment.
Instead of counting lines, maybe it would be better to collect the expected tips when creating the repos and testing whether they have been sent? That way we can be sure that the tips we send are those that we expect (and in the case of unrelated_repo want to stop sending in the future).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
We add an unrelated repository to the test added in #13598. It demonstrates that unrelated remotes' refs are being used in the tip negotiation.
Reproduction case for #13671.
Fix for this will be in a follow up PR.