Re: cg-clone not fetching all tags?
- From
Junio C Hamano <junkio@cox.net>
- Date
- Apr 30, 2006, 04:11 UTC
- Message-ID
- <7vaca31z50.fsf@assigned-by-dhcp.cox.net>
- In-Reply-To
- <20060429221114.557FC35288F@atlas.denx.de>
Wolfgang Denk <wd@denx.de> writes:
Show 13 quoted lines
> In message <200604292342.16306.johannes.sixt@telecom.at> you wrote: >> >> There are two types of tags: They can point to >> 1. a commit object >> 2. a proper tag object (which in turn references the commit) >> >> git-update-server-info seems to generate info only for case 2, and so are the >> only ones that http can fetch. > > And git-cvsimport (at least older versions of it) imports CVS tags > only as type 1 ? > > That would perfectly explain the situation. How can this be fixed?
I suspect there is no need to manufacture the tag. Something like this should do.
*WARNING* Since I do not do Porcelain, and I am not a Cogito user, this is obviously untested. In addition, I am seriously drunk right now...
-- >8 -- [PATCH] (cogito) Auto-follow lightweight tags as well.
---
diff --git a/cg-fetch b/cg-fetch index 687e6b9..39764c7 100755 --- a/cg-fetch +++ b/cg-fetch @@ -218,7 +218,8 @@ fetch_tags() git-ls-remote --tags "$uri" | # SHA1 refs/tags/v0.99.8^{} --> SHA1 tags/v0.99.8 # where SHA1 is the object v0.99.8 tag points at. - sed -ne 's:\([^ ]\) refs/\(tags/.*\)^{}$:\1 \2:p' | + sed -n -e 's:\([^ ]\) refs/\(tags/.*\)^{}$:\1 \2:p' \ + -e 's:\([^ ]\) refs/\(tags/.*\)$:\1 \2:p|' \ while read sha1 tagname; do # Do we have the tag itself? [ -s "$_git/refs/$tagname" ] && continue