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

Re: [PATCH] bundle-uri: copy all bundle references ino the refs/bundle space

From
Derrick Stolee <stolee@gmail.com>
Date
Mar 3, 2025, 18:46 UTC
Message-ID
<1d946797-e4d9-4c53-a728-ef80657e1431@gmail.com>
In-Reply-To
<xmqqfrjuvy18.fsf@gitster.g>
On 3/3/25 12:12 PM, Junio C Hamano wrote:
Show 25 quoted lines
> Scott Chacon <schacon@gmail.com> writes:
> 
>> Hey,
>>
>> On Wed, Feb 26, 2025 at 12:36 AM Derrick Stolee <stolee@gmail.com> wrote:
>>>
>>> The intention of the design is to avoid having the bundle URI fetch
>>> changing tag refs, especially annotated tags. Those tag updates are
>>> expected to be advertised in the "git fetch" output. It would probably
>>> be best to peel the tag refs to a commit and then create a fake branch
>>> for the bundle.
> 
> I am not sure where that need to avoid including tags comes from.
> 
>>> The biggest question I had (and tried to get ahead of on the PR) is
>>> the use of a test to demonstrate what kind of bundle files cause this
>>> issue. It would be important to demosntrate that the repo is still
>>> usable if "refs/bundles/tags/v1.0" exists and points to a tag object.
>>
>> I have written a test and I'll submit the new series in a minute, but
>> I'm not sure what you mean by 'usable' in this context. Is there a
>> situation where Git gets mad if there are annotated tags that aren't
>> under refs/tags?
> 
> I do not know of any at least for a local consumption of these tags.

These ideas about avoiding annotated tags outside of refs/tags/ is likely an invention of my own, and must not be a firm expectation of the Git tool.

Show 17 quoted lines
>> I have done these test clones and nothing bad seems to happen having
>> them in refs/bundle/tags/v1.0 that I notice, but I don't know how to
>> write a test that specifically verifies that.
> 
> Can it be some brittleness Derrick is worried about auto-following
> of tags during future "git fetch"?  You store a tag that a regular
> fetch may want to store at refs/tags/v1.0 in refs/bundles/tags/v1.0
> taken from the bundle, and then a later fetch may advance the
> history based on you extracted from the bundle---without having to
> run an explicit "git fetch --tags" or "git fetch origin v1.0", would
> we ever obtain "refs/tags/v1.0" with only the usual auto-following
> when we have the same tag elsewhere?
> 
> In any case, instead of me speculating, I'd prefer to hear from
> Derrick, who is a lot more familiar with the mechanism under
> discussion, what the issues are that we want to limit ourselves to
> local branches.

My thinking here is similar to the prefetch maintenance task: we want users who run "git fetch [origin]" to see the refs that are being updated by that action in the normal foreground messages. This includes new tag messages, such as in my local copy of the Git repository:

$ git fetch origin
remote: Enumerating objects: 186, done.
remote: Counting objects: 100% (168/168), done.
remote: Compressing objects: 100% (51/51), done.
remote: Total 186 (delta 120), reused 162 (delta 117), pack-reused 18 (from 2)
Receiving objects: 100% (186/186), 118.04 KiB | 10.73 MiB/s, done.
Resolving deltas: 100% (122/122), completed with 24 local objects.
 From github.com:git/git
    b838bf19389..db91954e186  master      -> origin/master
    2feabab25ac..627208d89de  next        -> origin/next
  + 9b2be6f7989...39dfbbf0521 seen        -> origin/seen  (forced update)
    5fa232d8520..fb8899337a8  todo        -> origin/todo
  * [new tag]                 v2.49.0-rc0 -> v2.49.0-rc0

As long as these messages are still appearing, then I'm fine with these annotated tags being added to the object database earlier by the bundle URI mechanism.

Scott: You also asked about the intended design for bundle URIs and
things, and the best places to look are Git's technical docs [1] and
the bundle server reference implementation docs [2]. CC Victoria who
implemented the reference implementation and wrote those docs.
[1] https://github.com/git/git/blob/master/Documentation/technical/bundle-uri.adoc

[2] https://github.com/git-ecosystem/git-bundle-server/blob/main/docs/technical/architecture.md

Thanks, -Stolee

Previous: Junio C HamanoNext: Scott Chacon via GitGitGadget
Message 6 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.