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?