- Notifications
You must be signed in to change notification settings - Fork66
Scalar: A set of tools and extensions for Git to allow very large monorepos to run on Git without a virtualization layer
License
microsoft/scalar
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
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 notdownloading all Git objects right away.
Background prefetch: downloads Git object data from all remotes everyhour, 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 eliminatesthe 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-filewithout disrupting concurrent commands by using the multi-pack-index.
As new versions of Git are released, we update the list of features thatScalar automatically configures. This reduces your effort to keep yourrepositories as efficient as possible.
Through significant effort from our team, we have successfully transitionedScalar from a modified version ofVFS for Git into a thin shellaround core Git features. The Scalar executable has now been ported to beincludedin themicrosoft/git
fork. Please visit thatfork for all of your Scalar needs:
- Downloadthe latest
microsoft/git
release. - Readthe Scalar documentation.
- Contribute changesto the
scalar
CLI.
Scalar started as a modification ofVFS for Git tocreate a working solution with a robust test suite in a short amount oftime. The goal was to depend more on features that exist within Git itselfinstead of creating new functionality within this project. Since the start,we have focused on this goal with efforts such asimproving sparse-checkout performance in Git,implementing background maintenance in Git,andintegrating the GVFS protocol intomicrosoft/git
which allowed us todrop theScalar.Mount
process.All of these changes reduced the size of the code in Scalar itself untilit could be replacedwith a small command-line interface.
Additional benefits to this change include making our release andinstallation mechanism much simpler. Users now only need to install onetool, not multiple, to take advantage of all of the benefits.
We are keeping themicrosoft/scalar
repository available since we havelinked to it and want to make sure those links continue to work. Weadded pointers in several places to navigate readers to themicrosoft/git
repository for the latest versions.
We also have a large set of functional tests that verify that Scalarenlistments continue to work in a variety of advanced Git scenarios. Thesetests are incredibly helpful as we advance features inmicrosoft/git
, sothose tests remain in this repository. We run them as part of pull requestvalidation inmicrosoft/git
, so no changes are made there without passingthis suite of tests.
We are working to ensure that users on the .NET version of Scalar have apainless experience while changing to the new version.
On Windows, users caninstall
microsoft/git
and theinstaller will remove the .NET version and update any registeredenlistments to work with the new version.On macOS, users should run
brew uninstall --cask scalar
orbrew uninstall --cask scalar-azrepos
depending on their version andthen runbrew install --cask microsoft-git
to get the new version.At the moment, users on macOS will need to re-runscalar register
on their enlistments to ensure they are registered for future upgrades.On Linux, there is no established uninstall mechanism, but the .NETversion can be removed via
sudo rm -rf /usr/local/lib/scalar/
. Installingthe new version will overwrite thescalar
binary in/usr/local/bin
.At the moment, users on Linux will need to re-runscalar register
on their enlistments to ensure they are registered for future upgrades.
You can check if the new Scalar version is installed correctly by runningscalar version
which should have the same output asgit version
.
The Scalar source code in this repo is available under the MIT license. SeeLicense.md.
This project has adopted theMicrosoft Open Source Code of Conduct.For more information see theCode of Conduct FAQ or contactopencode@microsoft.com with any additional questions or comments.
About
Scalar: A set of tools and extensions for Git to allow very large monorepos to run on Git without a virtualization layer
Resources
License
Code of conduct
Security policy
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Packages0
Uh oh!
There was an error while loading.Please reload this page.