Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[RFC] Bundle URIs Combined RFC #1234

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
897b504
docs: document bundle URI standard
derrickstolee Apr 18, 2022
6823262
remote-curl: add 'get' capability
derrickstolee Apr 18, 2022
cb270ec
bundle-uri: create basic file-copy logic
derrickstolee May 3, 2022
7bd508d
bundle-uri: add support for http(s):// and file://
derrickstolee May 3, 2022
c7ec970
fetch: add --bundle-uri option
derrickstolee May 3, 2022
701a983
fetch: add 'refs/bundle/' to log.excludeDecoration
derrickstolee May 3, 2022
7cb3bd1
clone: add --bundle-uri option
derrickstolee Apr 18, 2022
333180f
clone: --bundle-uri cannot be combined with --depth
derrickstolee Apr 18, 2022
f87cb15
bundle-uri: create bundle_list struct and helpers
derrickstolee May 4, 2022
2c94a55
bundle-uri: create base key-value pair parsing
derrickstolee May 4, 2022
4e0286f
bundle-uri: create "key=value" line parsing
avar May 4, 2022
8653864
bundle-uri: unit test "key=value" parsing
avar May 4, 2022
00dc67f
bundle-uri: limit recursion depth for bundle lists
derrickstolee May 17, 2022
1fd302d
bundle-uri: parse bundle list in config format
derrickstolee May 17, 2022
ceb253e
bundle-uri: fetch a list of bundles
derrickstolee May 17, 2022
94f552e
protocol v2: add server-side "bundle-uri" skeleton
avar Apr 25, 2022
1830d19
bundle-uri client: add minimal NOOP client
avar Apr 18, 2022
f14144f
bundle-uri client: add "git ls-remote-bundle-uri"
avar Apr 18, 2022
5d78566
bundle-uri: serve URI advertisement from bundle.* config
derrickstolee May 17, 2022
2bc1149
bundle-uri client: add boolean transfer.bundleURI setting
avar Apr 18, 2022
be9b139
bundle-uri: allow relative URLs in bundle lists
derrickstolee Apr 18, 2022
c0d6354
bundle-uri: download bundles from an advertised list
derrickstolee May 20, 2022
a0cf2c0
clone: unbundle the advertised bundles
derrickstolee May 20, 2022
de1a0ce
t5601: basic bundle URI tests
derrickstolee Apr 18, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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