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

Enforce only a minimum Git version #1719

Merged
merged 3 commits into from
Feb 9, 2021

Conversation

derrickstolee
Copy link
Contributor

The interface between microsoft/git and VFS for Git has been stable for a while. We don't anticipate changing it any time soon. Thus, we can drop the requirement of an exact Git version match.

This PR changes the current logic in a few ways:

  1. Take the full GitVersion parsing logic from microsoft/scalar, as it is more robust.
  2. Remove the exact version match with a minimum version match.
  3. Use a fixed constant version string instead of a build-time string.
  4. Require that the Revision of the version string is an exact match. We will use this to signal that a microsoft/git version introduces a breaking change that requires a VFS for Git upgrade.

What is a Revision item? In a Git version string such as v2.X.Y.vfs.Z.W, the Revision is represented by Z. This allows us to modify the other version items arbitrarily, including taking version numbers 2.X.Y from upstream and updating .W if we have any hotfixes to microsoft/git.

@derrickstolee
Copy link
Contributor Author

/azp run

@azure-pipelines
Copy link

No pipelines are associated with this pull request.

@derrickstolee derrickstolee force-pushed the git-version-checker branch 5 times, most recently from e808c51 to 0f83d6f Compare February 2, 2021 14:58
This parsing is more robust to many different Git versions.

Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
We will use the following rules for testing the Git version is
compatible with the current version of VFS for Git:

1. The Platform must match ".vfs."

2. The version must be at least the fixed minimum revision.

3. The Revision must equal the current minimum revision.

This allows us to upgrade Git without updating VFS for Git. Thus, we
could reduce VFS for Git version upgrades when Git releases a security
update.

Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
@derrickstolee derrickstolee changed the title [WIP] Enforce only a minimum Git version Enforce only a minimum Git version Feb 2, 2021
@derrickstolee derrickstolee marked this pull request as ready for review February 2, 2021 16:08
@derrickstolee derrickstolee merged commit b79035b into microsoft:master Feb 9, 2021
@derrickstolee derrickstolee mentioned this pull request Mar 23, 2021
derrickstolee added a commit that referenced this pull request Mar 23, 2021
Major Changes
----------------

* Includes Git v2.31.0.
* VFS for Git now only performs a minimum version check with the installed version of Git. This means that VFS for Git is compatible with Git versions `v2.30.0.vfs.0.0` or greater, and users can upgrade Git independently from [the `microsoft/git` releases page](https://github.com/microsoft/git/releases) independently of VFS for Git.

Pull Requests
--------------

* #1716: Update Git to remove ODB string check
* #1719: Enforce only a minimum Git version
* #1726: Config: commitGraph.generationVersion=1
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