-
Notifications
You must be signed in to change notification settings - Fork 63
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
Update Git to include en/sparse-checkout #374
Update Git to include en/sparse-checkout #374
Conversation
1d8fd59
to
64d54b4
Compare
Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
If we don't run the control repo with a sparse-checkout, then our error messages will deviate from those in our Scalar repo. It's time to make these tests cover the sparse mode in each case, since that's a Git feature, not a Scalar feature. 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>
4021c91
to
2e84934
Compare
Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
2e84934
to
356dbf5
Compare
/azp run microsoft.scalar |
Azure Pipelines successfully started running 1 pipeline(s). |
Scalar/CommandLine/CloneVerb.cs
Outdated
@@ -333,7 +333,7 @@ private Result GitClone() | |||
git.SetInLocalConfig($"core.sparseCheckoutCone", "true"); | |||
|
|||
this.fileSystem.CreateDirectory(Path.Combine(this.enlistment.DotGitRoot, "info")); | |||
this.fileSystem.WriteAllText(Path.Combine(this.enlistment.DotGitRoot, "info", "sparse-checkout"), "/*\n!/*/*"); | |||
this.fileSystem.WriteAllText(Path.Combine(this.enlistment.DotGitRoot, "info", "sparse-checkout"), "/*\n!/*/"); |
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.
do we want a trailing \n here ??
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.
I just ran a local test clone and the file is created without the final NL.
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.
Sorry that my commits aren't great here. The final commit uses git sparse-checkout init --cone
directly, which skirts this issue. Thanks for your attention to detail!
Also fixes a bug when running
scalar clone
followed bygit sparse-checkout disable
.See microsoft/git#267.