Skip to content

Commit 96d7861

Browse files
committed
bundle-uri: copy all bundle references ino the refs/bundle space
When downloading bundles via the bundle-uri functionality, we only copy the references from refs/heads into the refs/bundle space. I'm not sure why this refspec is hardcoded to be so limited, but it makes the ref negotiation on the subsequent fetch suboptimal, since it won't use objects that are referenced outside of the current heads of the bundled repository. This change to copy everything in refs/ in the bundle to refs/bundles/ significantly helps the subsequent fetch, since nearly all the references are now included in the negotiation. Signed-off-by: Scott Chacon <[email protected]>
1 parent 2d2a71c commit 96d7861

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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)