Skip to content

Commit d32dd8a

Browse files
committed
Merge branch 'ds/bundle-uri-3'
Define the logical elements of a "bundle list", data structure to store them in-core, format to transfer them, and code to parse them. * ds/bundle-uri-3: bundle-uri: suppress stderr from remote-https bundle-uri: quiet failed unbundlings bundle: add flags to verify_bundle() bundle-uri: fetch a list of bundles bundle: properly clear all revision flags bundle-uri: limit recursion depth for bundle lists bundle-uri: parse bundle list in config format 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 bundle-uri: use plain string in find_temp_filename()
2 parents bf0d9d0 + 8628a84 commit d32dd8a

17 files changed

+1156
-43
lines changed

Documentation/config.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -387,6 +387,8 @@ include::config/branch.txt[]
387387

388388
include::config/browser.txt[]
389389

390+
include::config/bundle.txt[]
391+
390392
include::config/checkout.txt[]
391393

392394
include::config/clean.txt[]

Documentation/config/bundle.txt

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
bundle.*::
2+
The `bundle.*` keys may appear in a bundle list file found via the
3+
`git clone --bundle-uri` option. These keys currently have no effect
4+
if placed in a repository config file, though this will change in the
5+
future. See link:technical/bundle-uri.html[the bundle URI design
6+
document] for more details.
7+
8+
bundle.version::
9+
This integer value advertises the version of the bundle list format
10+
used by the bundle list. Currently, the only accepted value is `1`.
11+
12+
bundle.mode::
13+
This string value should be either `all` or `any`. This value describes
14+
whether all of the advertised bundles are required to unbundle a
15+
complete understanding of the bundled information (`all`) or if any one
16+
of the listed bundle URIs is sufficient (`any`).
17+
18+
bundle.<id>.*::
19+
The `bundle.<id>.*` keys are used to describe a single item in the
20+
bundle list, grouped under `<id>` for identification purposes.
21+
22+
bundle.<id>.uri::
23+
This string value defines the URI by which Git can reach the contents
24+
of this `<id>`. This URI may be a bundle file or another bundle list.

Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -722,6 +722,7 @@ PROGRAMS += $(patsubst %.o,git-%$X,$(PROGRAM_OBJS))
722722
TEST_BUILTINS_OBJS += test-advise.o
723723
TEST_BUILTINS_OBJS += test-bitmap.o
724724
TEST_BUILTINS_OBJS += test-bloom.o
725+
TEST_BUILTINS_OBJS += test-bundle-uri.o
725726
TEST_BUILTINS_OBJS += test-chmtime.o
726727
TEST_BUILTINS_OBJS += test-config.o
727728
TEST_BUILTINS_OBJS += test-crontab.o

builtin/bundle.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,8 @@ static int cmd_bundle_verify(int argc, const char **argv, const char *prefix) {
129129
goto cleanup;
130130
}
131131
close(bundle_fd);
132-
if (verify_bundle(the_repository, &header, !quiet)) {
132+
if (verify_bundle(the_repository, &header,
133+
quiet ? VERIFY_BUNDLE_QUIET : VERIFY_BUNDLE_VERBOSE)) {
133134
ret = 1;
134135
goto cleanup;
135136
}
@@ -195,7 +196,7 @@ static int cmd_bundle_unbundle(int argc, const char **argv, const char *prefix)
195196
strvec_pushl(&extra_index_pack_args, "-v", "--progress-title",
196197
_("Unbundling objects"), NULL);
197198
ret = !!unbundle(the_repository, &header, bundle_fd,
198-
&extra_index_pack_args) ||
199+
&extra_index_pack_args, 0) ||
199200
list_bundle_refs(&header, argc, argv);
200201
bundle_header_release(&header);
201202
cleanup:

0 commit comments

Comments
 (0)