]> git.ipfire.org Git - thirdparty/git.git/commit
bundle-uri: copy all bundle references ino the refs/bundle space
authorScott Chacon <schacon@gmail.com>
Fri, 25 Apr 2025 19:33:08 +0000 (19:33 +0000)
committerJunio C Hamano <gitster@pobox.com>
Fri, 25 Apr 2025 20:36:45 +0000 (13:36 -0700)
commitc858c6442b53fc9b7e79923546668fe38fe2c58d
tree3818981d5c0edff5930aafe3fc408acb97b0bedc
parent683c54c999c301c2cd6f715c411407c413b1d84e
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.

The update to the bundle-uri unbundling refspec puts all the heads from a
bundle file into refs/bundle/heads instead of directly into refs/bundle/ so
the tests also need to be updated to look in the new heirarchy.

Signed-off-by: Scott Chacon <schacon@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Documentation/technical/bundle-uri.adoc
bundle-uri.c
t/t5558-clone-bundle-uri.sh