Scalar: A set of tools and extensions for Git to allow very large monorepos to run on Git without a virtualization layer
Перейти к файлу
Derrick Stolee 1f66ccf378
Merge pull request #538 from microsoft/dependabot/github_actions/dot-github/workflows/actions/download-artifact-4.1.7
Bump actions/download-artifact from 2 to 4.1.7 in /.github/workflows
2024-09-04 10:51:42 -04:00
.azure-pipelines Delete Scalar.UnitTests 2021-06-16 08:57:29 -04:00
.github Bump actions/download-artifact from 2 to 4.1.7 in /.github/workflows 2024-09-03 21:18:10 +00:00
Images Images: reintroduce images previously in Scalar/Images 2021-06-18 09:22:05 -04:00
Scalar.FunctionalTests Revert "Revert "FunctionalTests: remove GitCommands tests"" 2024-07-23 23:51:55 +02:00
Scalar.MSBuild Move to .NET Core 3.1 (LTS) 2020-02-28 16:22:27 +00:00
Scalar.Signing macOS: drop Mac service 2020-10-27 12:19:48 -04:00
Scalar.TestInfrastructure GitHelpers: ignore whitespace lines 2020-03-23 16:18:40 -04:00
Scripts Delete Scalar.UnitTests 2021-06-16 08:57:29 -04:00
docs docs: truncate after redirect 2021-06-18 14:46:10 -04:00
.editorconfig Standardize on LF thoughout the repository. 2019-08-12 20:07:41 -04:00
.gitattributes diff: use csharp driver for better function headers in .cs files 2019-09-16 08:19:34 -04:00
.gitignore Update gitignore for JetBrains IDEs 2019-11-07 16:05:45 +00:00
.vsconfig [REPLACE] Replace old name in all files 2019-08-10 12:41:55 -04:00
AuthoringTests.md AuthoringTests.md: update functional test docs 2020-09-03 17:17:30 -07:00
CONTRIBUTING.md contributing.md: update dotnet 3.0 to 3.1 in build instructions 2021-01-19 15:16:51 -05:00
Dependencies.props Remove unused packages that have vulnerable dependencies 2022-10-27 11:07:56 -04:00
Directory.Build.props Update Git to v2.34.0 2021-10-31 20:42:02 -04:00
Directory.Build.targets *.{cs,csproj,props,targets,sln}: remove BOM marks 2020-09-21 11:55:13 -07:00
License.md Standardize on LF thoughout the repository. 2019-08-12 20:07:41 -04:00
Protocol.md Rename cleanup: Old "VFS4G" now "Scalar" 2019-08-11 21:37:38 -04:00
Readme.md README: update with new location 2021-06-18 14:46:10 -04:00
SECURITY.md *.{md,cs}: remove CR line endings 2020-09-21 11:55:13 -07:00
Scalar.ruleset Add ruleset file 2019-11-07 16:05:44 +00:00
Scalar.sln Delete Scalar.Common 2021-06-16 08:57:30 -04:00
Signing.targets Fix Windows signing 2020-01-07 15:45:21 +00:00
global.json Upgrade common/pre build items and targets 2019-11-07 16:05:34 +00:00
nuget.config nuget.config: drop internal feed 2021-03-10 09:09:23 -05:00

Readme.md

Scalar

What is Scalar?

Scalar is a tool that helps Git scale to some of the largest Git repositories. It achieves this by enabling some advanced Git features, such as:

  • Partial clone: reduces time to get a working repository by not downloading all Git objects right away.

  • Background prefetch: downloads Git object data from all remotes every hour, reducing the amount of time for foreground git fetch calls.

  • Sparse-checkout: limits the size of your working directory.

  • File system monitor: tracks the recently modified files and eliminates the need for Git to scan the entire worktree.

  • Commit-graph: accelerates commit walks and reachability calculations, speeding up commands like git log.

  • Multi-pack-index: enables fast object lookups across many pack-files.

  • Incremental repack: Repacks the packed Git data into fewer pack-file without disrupting concurrent commands by using the multi-pack-index.

As new versions of Git are released, we update the list of features that Scalar automatically configures. This reduces your effort to keep your repositories as efficient as possible.

Scalar has moved!

Through significant effort from our team, we have successfully transitioned Scalar from a modified version of VFS for Git into a thin shell around core Git features. The Scalar executable has now been ported to be included in the microsoft/git fork. Please visit that fork for all of your Scalar needs:

Why did Scalar move?

Scalar started as a modification of VFS for Git to create a working solution with a robust test suite in a short amount of time. The goal was to depend more on features that exist within Git itself instead of creating new functionality within this project. Since the start, we have focused on this goal with efforts such as improving sparse-checkout performance in Git, implementing background maintenance in Git, and integrating the GVFS protocol into microsoft/git which allowed us to drop the Scalar.Mount process. All of these changes reduced the size of the code in Scalar itself until it could be replaced with a small command-line interface.

Additional benefits to this change include making our release and installation mechanism much simpler. Users now only need to install one tool, not multiple, to take advantage of all of the benefits.

What remains in this repository?

We are keeping the microsoft/scalar repository available since we have linked to it and want to make sure those links continue to work. We added pointers in several places to navigate readers to the microsoft/git repository for the latest versions.

We also have a large set of functional tests that verify that Scalar enlistments continue to work in a variety of advanced Git scenarios. These tests are incredibly helpful as we advance features in microsoft/git, so those tests remain in this repository. We run them as part of pull request validation in microsoft/git, so no changes are made there without passing this suite of tests.

What if I already installed Scalar and want the new version?

We are working to ensure that users on the .NET version of Scalar have a painless experience while changing to the new version.

  • On Windows, users can install microsoft/git and the installer will remove the .NET version and update any registered enlistments to work with the new version.

  • On macOS, users should run brew uninstall --cask scalar or brew uninstall --cask scalar-azrepos depending on their version and then run brew install --cask microsoft-git to get the new version. At the moment, users on macOS will need to re-run scalar register on their enlistments to ensure they are registered for future upgrades.

  • On Linux, there is no established uninstall mechanism, but the .NET version can be removed via sudo rm -rf /usr/local/lib/scalar/. Installing the new version will overwrite the scalar binary in /usr/local/bin. At the moment, users on Linux will need to re-run scalar register on their enlistments to ensure they are registered for future upgrades.

You can check if the new Scalar version is installed correctly by running scalar version which should have the same output as git version.

License

The Scalar source code in this repo is available under the MIT license. See License.md.

Code of Conduct

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.