-
Notifications
You must be signed in to change notification settings - Fork 66
Use gvfs-helper to download initial commit #232
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use gvfs-helper to download initial commit #232
Conversation
Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
/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>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approved with a small question
@@ -548,11 +545,6 @@ private Result CreateClone() | |||
Path.Combine(this.enlistment.WorkingDirectoryBackingRoot, ScalarConstants.DotGit.Head), | |||
"ref: refs/heads/" + this.Branch); | |||
|
|||
if (!this.TryDownloadRootGitAttributes(this.enlistment, this.gitObjects, out errorMessage)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this no longer required? (With Scalar is it enough to have any file in the root?)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
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. |
We still have code for the
gvfs/objects
endpoint due to downloading the initial commit at clone time. We can instead ask thegit gvfs-helper
to 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.