-
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
Enable experimental features through features.scalar=experimental
#484
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 <[email protected]>
Signed-off-by: Derrick Stolee <[email protected]>
Signed-off-by: Derrick Stolee <[email protected]>
Signed-off-by: Derrick Stolee <[email protected]>
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 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").
Co-authored-by: Matthew John Cheetham <[email protected]>
Signed-off-by: Derrick Stolee <[email protected]>
Signed-off-by: Derrick Stolee <[email protected]>
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.
LGTM minus one micro-optimisation :)
Co-authored-by: Matthew John Cheetham <[email protected]>
Signed-off-by: Derrick Stolee <[email protected]>
7dba1f1
to
969e63b
Compare
This expands the
GitVersion
parser to include anExtra
string. This will contain anything after2.X.Y.vfs.Z.W
. For instance, the tagv2.30.0.vfs.0.0.exp
contains the builtin FS Monitor feature (see microsoft/git#289).To enable experimental features, we check the new
feature.scalar
config setting. This has a few modes:feature.scalar=false
implies we want to disable optional features like FS Monitor.feature.scalar=true
or unset implies we want to use our default values, like using Watchman for FS Monitor.feature.scalar=experimental
means we should use available experimental features like FS Monitor. In the future, this could also include early versions of sparse-index.After using
git config
to set the appropriatefeature.scalar
value locally, users can runscalar run config
to 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.