git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH v3 0/2] bundle-uri: copy all bundle references ino the refs/bundle space

From
Scott Chacon via GitGitGadget <gitgitgadget@gmail.com>
Date
Mar 18, 2025, 15:36 UTC
Message-ID
<pull.1897.v3.git.git.1742312173.gitgitgadget@gmail.com>
In-Reply-To
<pull.1897.v2.git.git.1740825238.gitgitgadget@gmail.com>

Rebased the series onto current master and squashed the patch that modified the existing test into the main patch.

> bundle-uri: copy all bundle references ino the refs/bundle space
> bundle-uri: update bundle clone tests with new refspec path
Scott Chacon (2):
  bundle-uri: copy all bundle references ino the refs/bundle space
  bundle-uri: add test for bundle-uri clones with tags
 bundle-uri.c                |   2 +-
 t/t5558-clone-bundle-uri.sh | 203 +++++++++++++++++++++---------------
 2 files changed, 118 insertions(+), 87 deletions(-)
base-commit: 683c54c999c301c2cd6f715c411407c413b1d84e
Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-git-1897%2Fschacon%2Fsc-more-bundle-refs-v3
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-git-1897/schacon/sc-more-bundle-refs-v3
Pull-Request: https://github.com/git/git/pull/1897
Range-diff vs v2:
 1:  b36bc876fe1 < -:  ----------- bundle-uri: copy all bundle references ino the refs/bundle space
 2:  5e198ba5c66 ! 1:  2ccbfdcc2dc bundle-uri: update bundle clone tests with new refspec path
     @@ Metadata
      Author: Scott Chacon <schacon@gmail.com>
      
       ## Commit message ##
     -    bundle-uri: update bundle clone tests with new refspec path
     +    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 need to be updated to look in the new heirarchy.
     +    the tests also need to be updated to look in the new heirarchy.
      
          Signed-off-by: Scott Chacon <schacon@gmail.com>
      
     + ## bundle-uri.c ##
     +@@ bundle-uri.c: static int unbundle_from_file(struct repository *r, const char *file)
     + 		const char *branch_name;
     + 		int has_old;
     + 
     +-		if (!skip_prefix(refname->string, "refs/heads/", &branch_name))
     ++		if (!skip_prefix(refname->string, "refs/", &branch_name))
     + 			continue;
     + 
     + 		strbuf_setlen(&bundle_ref, bundle_prefix_len);
     +
       ## t/t5558-clone-bundle-uri.sh ##
      @@ t/t5558-clone-bundle-uri.sh: test_expect_success 'create bundle' '
       test_expect_success 'clone with path bundle' '
 3:  ea204679cb0 = 2:  d148b14c390 bundle-uri: add test for bundle-uri clones with tags
-- 
gitgitgadget
Previous: Derrick StoleeNext: Scott Chacon via GitGitGadget
Message 12 of 37 in “bundle-uri: copy all bundle references ino the refs/bundle space”
  1. bundle-uri: copy all bundle references ino the refs/bundle spaceScott Chacon via GitGitGadget, Feb 25, 2025
  2. Junio C HamanoFeb 25, 2025
  3. Derrick StoleeFeb 25, 2025
  4. Scott ChaconMar 1, 2025
  5. Junio C HamanoMar 3, 2025
  6. Derrick StoleeMar 3, 2025
  7. 0/3 bundle-uri: copy all bundle references ino the refs/bundle spaceScott Chacon via GitGitGadget, Mar 1, 2025
  8. 1/3 bundle-uri: copy all bundle references ino the refs/bundle spaceScott Chacon via GitGitGadget, Mar 1, 2025
  9. 2/3 bundle-uri: update bundle clone tests with new refspec pathScott Chacon via GitGitGadget, Mar 1, 2025
  10. 3/3 bundle-uri: add test for bundle-uri clones with tagsScott Chacon via GitGitGadget, Mar 1, 2025
  11. Derrick StoleeMar 3, 2025
  12. 0/2 bundle-uri: copy all bundle references ino the refs/bundle spaceScott Chacon via GitGitGadget, Mar 18, 2025
  13. 1/2 bundle-uri: copy all bundle references ino the refs/bundle spaceScott Chacon via GitGitGadget, Mar 18, 2025
  14. Phillip WoodMar 19, 2025
  15. 2/2 bundle-uri: add test for bundle-uri clones with tagsScott Chacon via GitGitGadget, Mar 18, 2025
  16. Phillip WoodMar 19, 2025
  17. Taylor BlauMar 19, 2025
  18. Toon ClaesApr 14, 2025
  19. Scott ChaconApr 25, 2025
  20. Junio C HamanoMar 21, 2025
  21. 0/2 bundle-uri: copy all bundle references ino the refs/bundle spaceScott Chacon via GitGitGadget, Apr 25, 2025
  22. 1/2 bundle-uri: copy all bundle references ino the refs/bundle spaceScott Chacon via GitGitGadget, Apr 25, 2025
  23. 2/2 bundle-uri: add test for bundle-uri clones with tagsScott Chacon via GitGitGadget, Apr 25, 2025
  24. Scott ChaconApr 25, 2025
  25. Phillip WoodApr 25, 2025
  26. Junio C HamanoApr 25, 2025
  27. 0/2 bundle-uri: copy all bundle references ino the refs/bundle spaceScott Chacon via GitGitGadget, Apr 25, 2025
  28. 2/2 bundle-uri: add test for bundle-uri clones with tagsScott Chacon via GitGitGadget, Apr 25, 2025
  29. 1/2 bundle-uri: copy all bundle references ino the refs/bundle spaceScott Chacon via GitGitGadget, Apr 25, 2025
  30. 0/2 bundle-uri: copy all bundle references ino the refs/bundle spaceScott Chacon via GitGitGadget, Apr 25, 2025
  31. 1/2 bundle-uri: copy all bundle references ino the refs/bundle spaceScott Chacon via GitGitGadget, Apr 25, 2025
  32. 2/2 bundle-uri: add test for bundle-uri clones with tagsScott Chacon via GitGitGadget, Apr 25, 2025
  33. 0/2 bundle-uri: copy all bundle references ino the refs/bundle spaceScott Chacon via GitGitGadget, Apr 25, 2025
  34. 2/2 bundle-uri: add test for bundle-uri clones with tagsScott Chacon via GitGitGadget, Apr 25, 2025
  35. 1/2 bundle-uri: copy all bundle references ino the refs/bundle spaceScott Chacon via GitGitGadget, Apr 25, 2025
  36. Junio C HamanoApr 25, 2025
  37. Phillip WoodApr 29, 2025

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.