diff options
Diffstat (limited to 'Documentation')
| -rw-r--r-- | Documentation/fetch-options.adoc | 19 | ||||
| -rw-r--r-- | Documentation/git-clone.adoc | 25 | ||||
| -rw-r--r-- | Documentation/gitprotocol-v2.adoc | 16 |
3 files changed, 45 insertions, 15 deletions
diff --git a/Documentation/fetch-options.adoc b/Documentation/fetch-options.adoc index 1ef9807d00..a0cfb50d89 100644 --- a/Documentation/fetch-options.adoc +++ b/Documentation/fetch-options.adoc @@ -92,11 +92,20 @@ precedence over the `fetch.output` config option. Use the partial clone feature and request that the server sends a subset of reachable objects according to a given object filter. When using `--filter`, the supplied _<filter-spec>_ is used for - the partial fetch. For example, `--filter=blob:none` will filter - out all blobs (file contents) until needed by Git. Also, - `--filter=blob:limit=<size>` will filter out all blobs of size - at least _<size>_. For more details on filter specifications, see - the `--filter` option in linkgit:git-rev-list[1]. + the partial fetch. ++ +If `--filter=auto` is used, the filter specification is determined +automatically by combining the filter specifications advertised by +the server for the promisor remotes that the client accepts (see +linkgit:gitprotocol-v2[5] and the `promisor.acceptFromServer` +configuration option in linkgit:git-config[1]). ++ +For details on all other available filter specifications, see the +`--filter=<filter-spec>` option in linkgit:git-rev-list[1]. ++ +For example, `--filter=blob:none` will filter out all blobs (file +contents) until needed by Git. Also, `--filter=blob:limit=<size>` will +filter out all blobs of size at least _<size>_. ifndef::git-pull[] `--write-fetch-head`:: diff --git a/Documentation/git-clone.adoc b/Documentation/git-clone.adoc index 57cdfb7620..0db2d1e5f0 100644 --- a/Documentation/git-clone.adoc +++ b/Documentation/git-clone.adoc @@ -187,11 +187,26 @@ objects from the source repository into a pack in the cloned repository. Use the partial clone feature and request that the server sends a subset of reachable objects according to a given object filter. When using `--filter`, the supplied _<filter-spec>_ is used for - the partial clone filter. For example, `--filter=blob:none` will - filter out all blobs (file contents) until needed by Git. Also, - `--filter=blob:limit=<size>` will filter out all blobs of size - at least _<size>_. For more details on filter specifications, see - the `--filter` option in linkgit:git-rev-list[1]. + the partial clone filter. ++ +If `--filter=auto` is used the filter specification is determined +automatically through the 'promisor-remote' protocol (see +linkgit:gitprotocol-v2[5]) by combining the filter specifications +advertised by the server for the promisor remotes that the client +accepts (see the `promisor.acceptFromServer` configuration option in +linkgit:git-config[1]). This allows the server to suggest the optimal +filter for the available promisor remotes. ++ +As with other filter specifications, the "auto" value is persisted in +the configuration. This ensures that future fetches will continue to +adapt to the server's current recommendation. ++ +For details on all other available filter specifications, see the +`--filter=<filter-spec>` option in linkgit:git-rev-list[1]. ++ +For example, `--filter=blob:none` will filter out all blobs (file +contents) until needed by Git. Also, `--filter=blob:limit=<size>` will +filter out all blobs of size at least _<size>_. `--also-filter-submodules`:: Also apply the partial clone filter to any submodules in the repository. diff --git a/Documentation/gitprotocol-v2.adoc b/Documentation/gitprotocol-v2.adoc index d93dd279ea..f985cb4c47 100644 --- a/Documentation/gitprotocol-v2.adoc +++ b/Documentation/gitprotocol-v2.adoc @@ -812,10 +812,15 @@ MUST appear first in each pr-fields, in that order. After these mandatory fields, the server MAY advertise the following optional fields in any order: -`partialCloneFilter`:: The filter specification used by the remote. +`partialCloneFilter`:: The filter specification for the remote. It +corresponds to the "remote.<name>.partialCloneFilter" config setting. Clients can use this to determine if the remote's filtering strategy -is compatible with their needs (e.g., checking if both use "blob:none"). -It corresponds to the "remote.<name>.partialCloneFilter" config setting. +is compatible with their needs (e.g., checking if both use +"blob:none"). Additionally they can use this through the +`--filter=auto` option in linkgit:git-clone[1]. With that option, the +filter specification of the clone will be automatically computed by +combining the filter specifications of the promisor remotes the client +accepts. `token`:: An authentication token that clients can use when connecting to the remote. It corresponds to the "remote.<name>.token" @@ -828,8 +833,9 @@ future protocol extensions. The client can use information transmitted through these fields to decide if it accepts the advertised promisor remote. Also, the client -can be configured to store the values of these fields (see -"promisor.storeFields" in linkgit:git-config[1]). +can be configured to store the values of these fields or use them +to automatically configure the repository (see "promisor.storeFields" +in linkgit:git-config[1] and `--filter=auto` in linkgit:git-clone[1]). Field values MUST be urlencoded. |
