Skip to content

Commit 4bb7254

Browse files
committed
Merge branch 'sc/bundle-uri-use-all-refs-in-bundle'
Bundle-URI feature did not use refs recorded in the bundle other than normal branches as anchoring points to optimize the follow-up fetch during "git clone"; now it is told to utilize all. * sc/bundle-uri-use-all-refs-in-bundle: bundle-uri: add test for bundle-uri clones with tags bundle-uri: copy all bundle references ino the refs/bundle space
2 parents 0b8d22f + 435b076 commit 4bb7254

File tree

3 files changed

+124
-94
lines changed

3 files changed

+124
-94
lines changed

Documentation/technical/bundle-uri.adoc

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -232,13 +232,13 @@ will interact with bundle URIs according to the following flow:
232232
are present in the client repository. If some are missing, then the
233233
client delays unbundling until other bundles have been unbundled,
234234
making those OIDs present. When all required OIDs are present, the
235-
client unbundles that data using a refspec. The default refspec is
236-
`+refs/heads/*:refs/bundles/*`, but this can be configured. These refs
237-
are stored so that later `git fetch` negotiations can communicate each
238-
bundled ref as a `have`, reducing the size of the fetch over the Git
239-
protocol. To allow pruning refs from this ref namespace, Git may
240-
introduce a numbered namespace (such as `refs/bundles/<i>/*`) such that
241-
stale bundle refs can be deleted.
235+
client unbundles that data using a refspec. The refspec used is
236+
`+refs/*:refs/bundles/*`. These refs are stored so that later
237+
`git fetch` negotiations can communicate each bundled ref as a `have`,
238+
reducing the size of the fetch over the Git protocol. To allow pruning
239+
refs from this ref namespace, Git may introduce a numbered namespace
240+
(such as `refs/bundles/<i>/*`) such that stale bundle refs can be
241+
deleted.
242242

243243
3. If the file is instead a bundle list, then the client inspects the
244244
`bundle.mode` to see if the list is of the `all` or `any` form.

bundle-uri.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -403,7 +403,7 @@ static int unbundle_from_file(struct repository *r, const char *file)
403403
const char *branch_name;
404404
int has_old;
405405

406-
if (!skip_prefix(refname->string, "refs/heads/", &branch_name))
406+
if (!skip_prefix(refname->string, "refs/", &branch_name))
407407
continue;
408408

409409
strbuf_setlen(&bundle_ref, bundle_prefix_len);

0 commit comments

Comments
 (0)