SYNOPSIS

scalar clone [--single-branch] [--branch <main-branch>] [--full-clone]
         [--no-fetch-commits-and-trees] [--local-cache-path <path>]
         [--cache-server-url <url>] <url> [<enlistment>]
scalar list
scalar register [<enlistment>]
scalar unregister [<enlistment>]
scalar run ( all | config | commit-graph | fetch | loose-objects | pack-files ) [<enlistment>]
scalar reconfigure [ --all | <enlistment> ]
scalar diagnose [<enlistment>]
scalar delete <enlistment>
scalar cache-server ( --get | --set <url> | --list [<remote>] ) [<enlistment>]

DESCRIPTION

Scalar is an opinionated repository management tool. By creating new repositories or registering existing repositories with Scalar, your Git experience will speed up. Scalar sets advanced Git config settings, maintains your repositories in the background, and helps reduce data sent across the network.

An important Scalar concept is the enlistment: this is the top-level directory of the project. It contains the subdirectory src/ which is a Git worktree. This encourages the separation between tracked files (inside src/) and untracked files (outside src/).

The command implements various subcommands, and different options depending on the subcommand. With the exception of clone and list, all subcommands expect to be run in an enlistment.

The following options can be specified before the subcommand:

-C <directory>

Before running the subcommand, change the working directory. This option imitates the same option of git(1).

-c <key>=<value>

For the duration of running the specified subcommand, configure this setting. This option imitates the same option of git(1).

COMMANDS

Clone

clone [<options>] <url> [<enlistment>]

Clones the specified repository, similar to git-clone(1). By default, only commit and tree objects are cloned. Once finished, the worktree is located at <enlistment>/src.

The sparse-checkout feature is enabled (except when run with --full-clone) and the only files present are those in the top-level directory. Use git sparse-checkout set to expand the set of directories you want to see, or git sparse-checkout disable to expand to all files (see git-sparse-checkout(1) for more details). You can explore the subdirectories outside your sparse-checkout by using git ls-tree HEAD.

-b <name>
--branch <name>

Instead of checking out the branch pointed to by the cloned repository’s HEAD, check out the <name> branch instead.

--[no-]single-branch

Clone only the history leading to the tip of a single branch, either specified by the --branch option or the primary branch remote’s HEAD points at.

Further fetches into the resulting repository will only update the remote-tracking branch for the branch this option was used for the initial cloning. If the HEAD at the remote did not point at any branch when --single-branch clone was made, no remote-tracking branch is created.

--[no-]full-clone

A sparse-checkout is initialized by default. This behavior can be turned off via --no-full-clone.

--[no-]fetch-commits-and-trees

The default behavior is to clone all commit and tree objects, with blob objects being fetched on demand. With the --no-fetch-commits-and-trees option, commit and tree objects are also fetched only as needed.

--local-cache-path <path>

Override the path to the local cache root directory; Pre-fetched objects are stored into a repository-dependent subdirectory of that path.

The default is <drive>:\.scalarCache on Windows (on the same drive as the clone), and ~/.scalarCache on macOS.

--cache-server-url <url>

Retrieve missing objects from the specified remote, which is expected to understand the GVFS protocol.

List

list

To see which repositories are currently registered by the service, run scalar list. This command, like clone, does not need to be run inside a Git worktree.

Register

register [<enlistment>]

Adds a repository to the list of registered repositories. If <enlistment> is not provided, then the enlistment associated with the current working directory is registered.

Unregister

unregister [<enlistment>]

Remove the specified repository from the list of repositories registered with Scalar. This stops the scheduled maintenance and the built-in FSMonitor.

Run

scalar run ( all | config | commit-graph | fetch | loose-objects | pack-files ) [<enlistment>]

Run the given maintenance task (or all tasks, if all was specified). Except for all and config, this subcommand simply hands off to git-maintenance(1) (mapping fetch to prefetch and pack-files to incremental-repack).

These tasks are run automatically as part of the scheduled maintenance, as soon as the repository is registered with Scalar. It should therefore not be necessary to run this command manually.

The config task is specific to Scalar and configures all those opinionated default settings that make Git work more efficiently with large repositories. As this task is run as part of scalar clone automatically, explicit invocations of this task are rarely needed.

Reconfigure

After a Scalar upgrade, or when the configuration of a Scalar enlistment was somehow corrupted or changed by mistake, this command allows to reconfigure the enlistment.

With the --all option, all enlistments currently registered with Scalar will be reconfigured. This option is meant to to be run every time Scalar was upgraded.

Diagnose

diagnose [<enlistment>]

When reporting issues with Scalar, it is often helpful to provide the information gathered by this command, including logs and certain statistics describing the data shape of the current enlistment.

The output of this command is a .zip file that is written into a directory adjacent to the worktree in the src directory.

Delete

delete <enlistment>

This command lets you delete an existing Scalar enlistment from your local file system, unregistering the repository and stopping any file watcher daemons (FSMonitor).

Cache-server

cache-server ( --get | --set <url> | --list [<remote>] ) [<enlistment>]

This command lets you query or set the GVFS-enabled cache server used to fetch missing objects.

--get

This is the default command mode: query the currently-configured cache server URL, if any.

--list

Access the gvfs/info endpoint of the specified remote (default: origin) to figure out which cache servers are available, if any.

In contrast to the --get command mode (which only accesses the local repository), this command mode triggers a request via the network that potentially requires authentication. If authentication is required, the configured credential helper is employed (see git-credential(1) for details).

SEE ALSO

Scalar --- Associated with the git(1) suite