Use gvfs-helper to download initial commit#232
Merged
derrickstolee merged 6 commits intomicrosoft:masterfrom Nov 13, 2019
derrickstolee:gvfs-helper-commit
Merged
Use gvfs-helper to download initial commit#232derrickstolee merged 6 commits intomicrosoft:masterfrom derrickstolee:gvfs-helper-commit
derrickstolee merged 6 commits intomicrosoft:masterfrom
derrickstolee:gvfs-helper-commit
Conversation
Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
kewillford
reviewed
Nov 12, 2019
Contributor
Author
|
/azp run microsoft.scalar |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
Some tests use OpenFileAndWriteWithoutClose() as a way to check if our Git commands behave the same. However, if the filestream is disposed before the command runs, then we can get a situation where the behavior changes. By returning a "signalDone" action, we can keep a pointer to the stream alive, then close it at the appropriate time. Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
wilbaker
approved these changes
Nov 13, 2019
Member
wilbaker
left a comment
There was a problem hiding this comment.
Approved with a small question
| Path.Combine(this.enlistment.WorkingDirectoryBackingRoot, ScalarConstants.DotGit.Head), | ||
| "ref: refs/heads/" + this.Branch); | ||
|
|
||
| if (!this.TryDownloadRootGitAttributes(this.enlistment, this.gitObjects, out errorMessage)) |
Member
There was a problem hiding this comment.
Why is this no longer required? (With Scalar is it enough to have any file in the root?)
Contributor
Author
There was a problem hiding this comment.
VFS for Git requires the attributes file to exist so Git doesn't munge files somehow. We are not virtualizing, so we don't need it. The first git checkout will lay out all of the files at root for us.
Contributor
Author
|
I'm going to merge this one quickly because it has the fix for the flaky test. If anyone has late comments, I will follow-up. |
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 still have code for the
gvfs/objectsendpoint due to downloading the initial commit at clone time. We can instead ask thegit gvfs-helperto make a POST request on that commit, which reduces our code significantly.Also remove size endpoint details while we are here.
See microsoft/git#221 for the Git changes required.