Skip to content

Commit 31d933b

Browse files
committed
scalar: adjust documentation to the microsoft/git fork
Scalar in Microsoft's Git fork can do a little more than Scalar in upstream Git: in Microsoft's Git, it supports the GVFS protocol so that Scalar can clone from Azure DevOps. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
1 parent 0f6df8b commit 31d933b

File tree

4 files changed

+68
-23
lines changed

4 files changed

+68
-23
lines changed

contrib/scalar/docs/getting-started.md

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,9 @@ Creating a new Scalar clone
1818
---------------------------------------------------
1919

2020
The `clone` verb creates a local enlistment of a remote repository using the
21-
partial clone feature available e.g. on GitHub.
22-
21+
partial clone feature available e.g. on GitHub, or using the
22+
[GVFS protocol](https://github.com/microsoft/VFSForGit/blob/HEAD/Protocol.md),
23+
such as Azure Repos.
2324

2425
```
2526
scalar clone [options] <url> [<dir>]
@@ -68,11 +69,26 @@ in `<path>`.
6869
These options allow a user to customize their initial enlistment.
6970

7071
* `--full-clone`: If specified, do not initialize the sparse-checkout feature.
71-
All files will be present in your `src` directory. This uses a Git partial
72-
clone: blobs are downloaded on demand.
72+
All files will be present in your `src` directory. This behaves very similar
73+
to a Git partial clone in that blobs are downloaded on demand. However, it
74+
will use the GVFS protocol to download all Git objects.
75+
76+
* `--cache-server-url=<url>`: If specified, set the intended cache server to
77+
the specified `<url>`. All object queries will use the GVFS protocol to this
78+
`<url>` instead of the origin remote. If the remote supplies a list of
79+
cache servers via the `<url>/gvfs/config` endpoint, then the `clone` command
80+
will select a nearby cache server from that list.
7381

7482
* `--branch=<ref>`: Specify the branch to checkout after clone.
7583

84+
* `--local-cache-path=<path>`: Use this option to override the path for the
85+
local Scalar cache. If not specified, then Scalar will select a default
86+
path to share objects with your other enlistments. On Windows, this path
87+
is a subdirectory of `<Volume>:\.scalarCache\`. On Mac, this path is a
88+
subdirectory of `~/.scalarCache/`. The default cache path is recommended so
89+
multiple enlistments of the same remote repository share objects on the
90+
same device.
91+
7692
### Advanced Options
7793

7894
The options below are not intended for use by a typical user. These are

contrib/scalar/docs/index.md

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,14 @@ these features for that repo (except partial clone) and start running suggested
2828
maintenance in the background using
2929
[the `git maintenance` feature](https://git-scm.com/docs/git-maintenance).
3030

31-
Repos cloned with the `scalar clone` command use partial clone to significantly
32-
reduce the amount of data required to get started using a repository. By
33-
delaying all blob downloads until they are required, Scalar allows you to work
34-
with very large repositories quickly.
31+
Repos cloned with the `scalar clone` command use partial clone or the
32+
[GVFS protocol](https://github.com/microsoft/VFSForGit/blob/HEAD/Protocol.md)
33+
to significantly reduce the amount of data required to get started
34+
using a repository. By delaying all blob downloads until they are required,
35+
Scalar allows you to work with very large repositories quickly. The GVFS
36+
protocol allows a network of _cache servers_ to serve objects with lower
37+
latency and higher throughput. The cache servers also reduce load on the
38+
central server.
3539

3640
Documentation
3741
-------------
@@ -42,7 +46,7 @@ Documentation
4246

4347
* [Troubleshooting](troubleshooting.md):
4448
Collect diagnostic information or update custom settings. Includes
45-
`scalar diagnose`.
49+
`scalar diagnose` and `scalar cache-server`.
4650

4751
* [The Philosophy of Scalar](philosophy.md): Why does Scalar work the way
4852
it does, and how do we make decisions about its future?

contrib/scalar/docs/philosophy.md

Lines changed: 19 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -13,22 +13,27 @@ Scalar only to configure those new settings. In particular, we ported
1313
features like background maintenance to Git to make Scalar simpler and
1414
make Git more powerful.
1515

16-
Services such as GitHub support partial clone , a standard adopted by the Git
17-
project to download only part of the Git objects when cloning, and fetching
18-
further objects on demand. If your hosting service supports partial clone, then
19-
we absolutely recommend it as a way to greatly speed up your clone and fetch
20-
times and to reduce how much disk space your Git repository requires. Scalar
21-
will help with this!
16+
Scalar ships inside [a custom version of Git][microsoft-git], but we are
17+
working to make it available in other forks of Git. The only feature
18+
that is not intended to ever reach the standard Git client is Scalar's use
19+
of [the GVFS Protocol][gvfs-protocol], which is essentially an older
20+
version of [Git's partial clone feature](https://github.blog/2020-12-21-get-up-to-speed-with-partial-clone-and-shallow-clone/)
21+
that was available first in Azure Repos. Services such as GitHub support
22+
only partial clone instead of the GVFS protocol because that is the
23+
standard adopted by the Git project. If your hosting service supports
24+
partial clone, then we absolutely recommend it as a way to greatly speed
25+
up your clone and fetch times and to reduce how much disk space your Git
26+
repository requires. Scalar will help with this!
2227

23-
Most of the value of Scalar can be found in the core Git client. However, most
24-
of the advanced features that really optimize Git's performance are off by
25-
default for compatibility reasons. To really take advantage of Git's latest and
26-
greatest features, you either need to study the [`git config`
27-
documentation](https://git-scm.com/docs/git-config) and regularly read [the Git
28-
release notes](https://github.com/git/git/tree/master/Documentation/RelNotes).
28+
If you don't use the GVFS Protocol, then most of the value of Scalar can
29+
be found in the core Git client. However, most of the advanced features
30+
that really optimize Git's performance are off by default for compatibility
31+
reasons. To really take advantage of Git's latest and greatest features,
32+
you either need to study the [`git config` documentation](https://git-scm.com/docs/git-config)
33+
and regularly read [the Git release notes](https://github.com/git/git/tree/master/Documentation/RelNotes).
2934
Even if you do all that work and customize your Git settings on your machines,
30-
you likely will want to share those settings with other team members. Or, you
31-
can just use Scalar!
35+
you likely will want to share those settings with other team members.
36+
Or, you can just use Scalar!
3237

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

contrib/scalar/docs/troubleshooting.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,23 @@ files for that repository. This includes:
1818

1919
As the `diagnose` command completes, it provides the path of the resulting
2020
zip file. This zip can be attached to bug reports to make the analysis easier.
21+
22+
Modifying Configuration Values
23+
------------------------------
24+
25+
The Scalar-specific configuration is only available for repos using the
26+
GVFS protocol.
27+
28+
### Cache Server URL
29+
30+
When using an enlistment cloned with `scalar clone` and the GVFS protocol,
31+
you will have a value called the cache server URL. Cache servers are a feature
32+
of the GVFS protocol to provide low-latency access to the on-demand object
33+
requests. This modifies the `gvfs.cache-server` setting in your local Git config
34+
file.
35+
36+
Run `scalar cache-server --get` to see the current cache server.
37+
38+
Run `scalar cache-server --list` to see the available cache server URLs.
39+
40+
Run `scalar cache-server --set=<url>` to set your cache server to `<url>`.

0 commit comments

Comments
 (0)