Skip to content

Commit

Permalink
Merge branch 'ds/bundle-uri-more' into seen
Browse files Browse the repository at this point in the history
source: <pull.1234.git.1653072042.gitgitgadget@gmail.com>
source: <pull.1233.git.1652731865.gitgitgadget@gmail.com>

* ds/bundle-uri-more: (24 commits)
  t5601: basic bundle URI tests
  clone: unbundle the advertised bundles
  bundle-uri: download bundles from an advertised list
  bundle-uri: allow relative URLs in bundle lists
  bundle-uri client: add boolean transfer.bundleURI setting
  bundle-uri: serve URI advertisement from bundle.* config
  bundle-uri client: add "git ls-remote-bundle-uri"
  bundle-uri client: add minimal NOOP client
  protocol v2: add server-side "bundle-uri" skeleton
  bundle-uri: fetch a list of bundles
  bundle-uri: parse bundle list in config format
  bundle-uri: limit recursion depth for bundle lists
  bundle-uri: unit test "key=value" parsing
  bundle-uri: create "key=value" line parsing
  bundle-uri: create base key-value pair parsing
  bundle-uri: create bundle_list struct and helpers
  clone: --bundle-uri cannot be combined with --depth
  clone: add --bundle-uri option
  fetch: add 'refs/bundle/' to log.excludeDecoration
  fetch: add --bundle-uri option
  ...
  • Loading branch information
gitster committed May 24, 2022
2 parents b05723d + 4183d35 commit de40345
Show file tree
Hide file tree
Showing 37 changed files with 2,503 additions and 2 deletions.
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -91,6 +91,7 @@
/git-log
/git-ls-files
/git-ls-remote
/git-ls-remote-bundle-uri
/git-ls-tree
/git-mailinfo
/git-mailsplit
Expand Down
6 changes: 6 additions & 0 deletions Documentation/config/transfer.txt
Expand Up @@ -77,3 +77,9 @@ transfer.unpackLimit::
transfer.advertiseSID::
Boolean. When true, client and server processes will advertise their
unique session IDs to their remote counterpart. Defaults to false.

transfer.bundleURI::
When set to `false` ignores any server advertisement of
`bundle-uri` and proceed with a "normal" clone/fetch even if
using bundles to bootstap is possible. Defaults to `true`,
i.e. bundle-uri is tried whenever a server offers it.
6 changes: 6 additions & 0 deletions Documentation/fetch-options.txt
Expand Up @@ -317,3 +317,9 @@ endif::git-pull[]
-6::
--ipv6::
Use IPv6 addresses only, ignoring IPv4 addresses.

--bundle-uri=<uri>::
Instead of fetching from a remote, fetch a bundle from the given
`<uri>` and unbundle the data into the local repository. The refs
in the bundle will be stored under the hidden `refs/bundle/*`
namespace.
1 change: 1 addition & 0 deletions Documentation/git-fetch.txt
Expand Up @@ -13,6 +13,7 @@ SYNOPSIS
'git fetch' [<options>] <group>
'git fetch' --multiple [<options>] [(<repository> | <group>)...]
'git fetch' --all [<options>]
'git fetch' --bundle-uri=<uri> [<options>]


DESCRIPTION
Expand Down
62 changes: 62 additions & 0 deletions Documentation/git-ls-remote-bundle-uri.txt
@@ -0,0 +1,62 @@
git-ls-remote-bundle-uri(1)
===========================

NAME
----
git-ls-remote-bundle-uri - List 'bundle-uri' in a remote repository

SYNOPSIS
--------
[verse]
'git ls-remote-bundle-uri' [-q |--quiet] [--uri] [--upload-pack=<exec>]
[[-o | --server-option=]<option>] <repository>


DESCRIPTION
-----------

Displays the `bundle-uri`s advertised by a remote repository. See
`bundle-uri` in link:technical/protocol-v2.html[the Git Wire Protocol,
Version 2] documentation for what the output format looks like.

OPTIONS
-------

-q::
--quiet::
Do not print remote URL to stderr in cases where the remote
name is inferred from config.
+
When the remote name is not inferred (e.g. `git ls-remote-bundle-uri
origin`, or `git ls-remote-bundle-uri https://[...]`) the remote URL
is not printed in any case.

--uri::
Print only the URIs, and not any of their optional attributes.

--upload-pack=<exec>::
Specify the full path of 'git-upload-pack' on the remote
host. This allows listing references from repositories accessed via
SSH and where the SSH daemon does not use the PATH configured by the
user.

-o <option>::
--server-option=<option>::
Transmit the given string to the server when communicating using
protocol version 2. The given string must not contain a NUL or LF
character.
When multiple `--server-option=<option>` are given, they are all
sent to the other side in the order listed on the command line.

<repository>::
The "remote" repository to query. This parameter can be
either a URL or the name of a remote (see the GIT URLS and
REMOTES sections of linkgit:git-fetch[1]).

SEE ALSO
--------
linkgit:git-ls-remote[1].

GIT
---
Part of the linkgit:git[1] suite
1 change: 1 addition & 0 deletions Documentation/git-ls-remote.txt
Expand Up @@ -114,6 +114,7 @@ c5db5456ae3b0873fc659c19fafdde22313cc441 refs/tags/v0.99.2

SEE ALSO
--------
linkgit:git-ls-remote-bundle-uri[1].
linkgit:git-check-ref-format[1].

GIT
Expand Down
6 changes: 6 additions & 0 deletions Documentation/gitremote-helpers.txt
Expand Up @@ -168,6 +168,9 @@ Supported commands: 'list', 'import'.
Can guarantee that when a clone is requested, the received
pack is self contained and is connected.

'get'::
Can use the 'get' command to download a file from a given URI.

If a helper advertises 'connect', Git will use it if possible and
fall back to another capability if the helper requests so when
connecting (see the 'connect' command under COMMANDS).
Expand Down Expand Up @@ -418,6 +421,9 @@ Supported if the helper has the "connect" capability.
+
Supported if the helper has the "stateless-connect" capability.

'get' <uri> <path>::
Downloads the file from the given `<uri>` to the given `<path>`.

If a fatal error occurs, the program writes the error message to
stderr and exits. The caller should expect that a suitable error
message has been printed if the child closes the connection without
Expand Down

0 comments on commit de40345

Please sign in to comment.