Enable experimental features through features.scalar=experimental#484
Merged
derrickstolee merged 9 commits intomicrosoft:mainfrom Feb 5, 2021
Merged
Enable experimental features through features.scalar=experimental#484derrickstolee merged 9 commits intomicrosoft:mainfrom
features.scalar=experimental#484derrickstolee merged 9 commits intomicrosoft:mainfrom
Conversation
The Git version string looks like this: v2.X.Y.vfs.Z.W[.stuff] Usually ".stuff" only exists if we build Git with a version that isn't tagged. However, we will create experimental releases that end with ".exp". Use this to indicate whether or not the builtin FS Monitor feature is available. 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>
dscho
reviewed
Feb 2, 2021
dscho
reviewed
Feb 2, 2021
dscho
approved these changes
Feb 2, 2021
Member
dscho
left a comment
There was a problem hiding this comment.
I had only one nit-pick, and a comment about the overall strategy to determine whether the current Git version supports FSMonitor (it might be a bad idea to rely on the .exp tell-tale for determining whether the current Git version supports FSMonitor, a better alternative would be to run git fsmonitor--daemon -h and test for the exit code 129, indicating that the usage was shown, 127 would be "not found").
jeffhostetler
approved these changes
Feb 2, 2021
mjcheetham
reviewed
Feb 3, 2021
Co-authored-by: Matthew John Cheetham <mjcheetham@github.com>
Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
mjcheetham
approved these changes
Feb 4, 2021
Member
mjcheetham
left a comment
There was a problem hiding this comment.
LGTM minus one micro-optimisation :)
Co-authored-by: Matthew John Cheetham <mjcheetham@github.com>
Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
7dba1f1 to
969e63b
Compare
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.
This expands the
GitVersionparser to include anExtrastring. This will contain anything after2.X.Y.vfs.Z.W. For instance, the tagv2.30.0.vfs.0.0.expcontains the builtin FS Monitor feature (see microsoft/git#289).To enable experimental features, we check the new
feature.scalarconfig setting. This has a few modes:feature.scalar=falseimplies we want to disable optional features like FS Monitor.feature.scalar=trueor unset implies we want to use our default values, like using Watchman for FS Monitor.feature.scalar=experimentalmeans we should use available experimental features like FS Monitor. In the future, this could also include early versions of sparse-index.After using
git configto set the appropriatefeature.scalarvalue locally, users can runscalar run configto re-initialize features according to this recommendation. These instructions will be part of the experimental release documentation when we are closer to making that available.This is appropriate for full releases, as it will do nothing new if users don't have the experimental Git release as well.