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

regenerating tags when cloning

From
WHWill Holcomb <w@dhappy.org>
Date
Jun 13, 2020, 22:37 UTC
Message-ID
<CAB8ffCD4jO6GxRohMpsyszdvi7dmz7HzE=2aNdqBG_zOGgOCoA@mail.gmail.com>

I am working on a git remote (https://github.com/dhappy/git-remote-ipfs), and I am confused as to how to recreate signed tags when cloning.

My remote serializes the commit chain to IPFS and back. It works
correctly for branches, but I'm having difficulty with tags:
 • If I recreate tags, I get the error: "fatal: BUG: initial ref
transaction called with existing refs".
 • If I don't create the tags, I get an error like: "Error: reference
'refs/tags/v0.3.4' not found".
 • If I create the tags and remove the references, the clone will
complete, but the resultant repo has a detached head and no tags.

I created a minimum failing example when I posted to stackoverflow: https://stackoverflow.com/q/62360443/264008

I can do a "git clone --tags" from Github, and it creates a clone with tags, so I know it can be done. I just don't understand what I need to change.

It might be germane that I am translating the git objects into a
CBOR-DAG: https://explore.ipld.io/#/explore/Qmcnzkb1YGyDWBqSaFz1k7qi3F1VDaHNsBWNF2SvRiYeL5/.git
and relying on nodegit to reconstruct objects with the same SHA1
hashes on fetch, so I can't directly insert things into the object
database.
Any suggestions would be greatly appreciated.
–☮W
Next: Philip Oakley
Message 1 of 2 in “regenerating tags when cloning”
  1. Will HolcombJun 13, 2020
  2. Philip OakleyJun 14, 2020

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.