Skip to content
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

Merged

Conversation

derrickstolee
Copy link
Contributor

@derrickstolee derrickstolee commented May 4, 2020

Also fixes a bug when running scalar clone followed by git sparse-checkout disable.

See microsoft/git#267.

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>
@derrickstolee derrickstolee force-pushed the sparse-checkout-status-fix branch 2 times, most recently from 4021c91 to 2e84934 Compare May 14, 2020 10:59
Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
@derrickstolee
Copy link
Contributor Author

/azp run microsoft.scalar

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@@ -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!/*/");
Copy link
Contributor

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 ??

Copy link
Contributor

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.

Copy link
Contributor Author

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!

@derrickstolee derrickstolee merged commit 11d3a24 into microsoft:master May 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants