Skip to content

Conversation

@derrickstolee
Copy link
Contributor

This expands the GitVersion parser to include an Extra string. This will contain anything after 2.X.Y.vfs.Z.W. For instance, the tag v2.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:

  1. feature.scalar=false implies we want to disable optional features like FS Monitor.
  2. feature.scalar=true or unset implies we want to use our default values, like using Watchman for FS Monitor.
  3. 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 appropriate feature.scalar value locally, users can run scalar 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.

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>
Copy link
Member

@dscho dscho left a 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").

derrickstolee and others added 3 commits February 3, 2021 07:23
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>
Copy link
Member

@mjcheetham mjcheetham left a 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 :)

derrickstolee and others added 2 commits February 4, 2021 13:10
Co-authored-by: Matthew John Cheetham <mjcheetham@github.com>
Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
@derrickstolee derrickstolee merged commit f0e862e into microsoft:main Feb 5, 2021
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.

4 participants