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

Re: cg-clone, tag objects and cg-push/git-push don't play nice

From
Junio C Hamano <junkio@cox.net>
Date
Oct 19, 2005, 07:16 UTC
Message-ID
<7vzmp6dlii.fsf@assigned-by-dhcp.cox.net>
In-Reply-To
<46a038f90510182338k6d3d52fbyc2057e9b775d5b14@mail.gmail.com>
Martin Langhoff <martin.langhoff@gmail.com> writes:
>  + git-push is trying to walk all the refs it knows about when it does
> the "what do I have that the repo doesn't" part, and it breaks on
> those incomplete tag fetches.
That is expected.
Show 7 quoted lines
> Removing  .git/refs/tags/* didn't help. If I actually rm all the
> problematic tag objects from the object repository, I can then push
> correctly. Lucky it wasn't packed.
>
> I am going to write a quick'n'dirty script to fix our repos when this
> happens, and I'll try my hand at a patch to cg-fetch. Can git-push be
> taught to be smarter in these cases?

Although I do not follow Cogito development closely, I seem to recall that it fetched tags without making them complete at some point in the past; I hope it is now fixed but I am not sure.

I cannot think offhand of a way how git-push could help to cope with a repository broken that way. However, we could probably have a tool that tangles from each ref, find incomplete ones and remove them from .git/refs. After running that maybe pull from a know good copy would fix the broken repository.

I do not understand why removing .git/refs/tags/* did not help, and that is the biggest thing that disturbs me in this whole problem report. We (meaning git-* transfer, not cg-* transfer whose correctness I cannot vouch for) _should_ be relying only on refs not object existence. Maybe there are some other files under .git/refs/ directory that had copies of them?

Previous: Martin LanghoffNext: Martin Langhoff
Message 2 of 5 in “cg-clone, tag objects and cg-push/git-push don't play nice”
  1. Martin LanghoffOct 19, 2005
  2. Junio C HamanoOct 19, 2005
  3. Martin LanghoffOct 19, 2005
  4. Junio C HamanoOct 19, 2005
  5. Martin LanghoffOct 19, 2005

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.