Skip to content

Latest commit

 

History

History
71 lines (61 loc) · 3.92 KB

philosophy.md

File metadata and controls

71 lines (61 loc) · 3.92 KB

The Philosophy of Scalar

The team building Scalar has opinions about Git performance. Scalar takes out the guesswork by automatically configuring your Git repositories to take advantage of the latest and greatest features. It is difficult to say that these are the absolute best settings for every repository, but these settings do work for some of the largest repositories in the world.

Scalar intends to do very little more than the standard Git client. We actively implement new features into Git instead of Scalar, then update Scalar only to configure those new settings. In particular, we ported features like background maintenance to Git to make Scalar simpler and make Git more powerful.

Scalar ships inside a custom version of Git, but we are working to make it available in other forks of Git. The only feature that is not intended to ever reach the standard Git client is Scalar's use of the GVFS Protocol, which is essentially an older version of Git's partial clone feature that was available first in Azure Repos. Services such as GitHub support only partial clone instead of the GVFS protocol because that is the standard adopted by the Git project. If your hosting service supports partial clone, then we absolutely recommend it as a way to greatly speed up your clone and fetch times and to reduce how much disk space your Git repository requires. Scalar will help with this!

If you don't use the GVFS Protocol, then most of the value of Scalar can be found in the core Git client. However, most of the advanced features that really optimize Git's performance are off by default for compatibility reasons. To really take advantage of Git's latest and greatest features, you either need to study the git config documentation and regularly read the Git release notes. Even if you do all that work and customize your Git settings on your machines, you likely will want to share those settings with other team members. Or, you can just use Scalar!

Using scalar register on an existing Git repository will give you these benefits:

  • Additional compression of your .git/index file.
  • Hourly background git fetch operations, keeping you in-sync with your remotes.
  • Advanced data structures, such as the commit-graph and multi-pack-index are updated automatically in the background.
  • If using macOS or Windows, then Scalar configures Git's builtin File System Monitor, providing faster commands such as git status or git add.

Additionally, if you use scalar clone to create a new repository, then you will automatically get these benefits:

  • Use Git's partial clone feature to only download the files you need for your current checkout.
  • Use Git's sparse-checkout feature to minimize the number of files required in your working directory. Read more about sparse-checkout here.
  • Create the Git repository inside <repo-name>/src to make it easy to place build artifacts outside of the Git repository, such as in <repo-name>/bin or <repo-name>/packages.

We also admit that these opinions can always be improved! If you have an idea of how to improve our setup, consider creating an issue or contributing a pull request! Some existing issues have already improved our configuration settings and roadmap!