Federico notes of a change that every single git-mirror user needs to make to every one of their clones to have its tags stay up to date properly. So, dear lazyweb, my question is simply this: How can I (as git-mirror guy) make this annoying git-foo go away? I hate stupid crazy repetitive manual crap that every one of my users has to put up with !
You can see how the mirrors are currently created and updated in the vcs-mirror repository. To share in my vodka and whisky spoils for setting up git-mirror (which, despite idle threats to the contrary, i’m still waiting for) your solution should not disturb existing clones….
(And yes, that is a hg script you see).
How about git fetch –tags? As far as I know, ‘git fetch’ should fetch all tags automatically. I’ve never seen anyone add such a line, and I always receive my tags.
Hi John,
Thanks for providing that mirror. Already saves zillions of electrons and quite some time, I guess.
So far I have just one wish: git downloads are much more efficient when the repository is packed. Therefore I’d like to see “git gc”, or at least “git repack” being run regularly on the mirrored repositories.
Thank you for providing this service,
Mathias
I guess Federico should have run git fetch -t instead of git fetch ; his .git/config additions should be unnecessary
Rig your .gitconfig (man git-config), you can change default parameters of any git command
Oops, you were asking about how you could change this from the server end - mea culpa. The tip is still handy though
Sounds like you might be interested in yap: http://repo.or.cz/w/yap.git
yap is actually an entire git porcelain, but it is specifically designed to make interacting with subversion repositories easier (hopefully seamless). E.g., to clone a subversion repo:
yap clone (this is the same syntax as cloning a git repo)
At the end, you have a git repo with the full history from subversion. Obviously, that can take a long time, so you can host that git repo somewhere (git-mirror, for example). When users “yap clone” it, they too will have a git repo with full subversion history ready to fetch and push back to the original subversion server.
Hmmm, maybe the “svn/” prefix for tags has something to do with this? (I.e. by default “fetch” may only fetch refs/tags/* but not refs/tags/SUBDIR/*)
Federico: It does fetch anything that is a tag, and anything that is in refs/tags/subdir/* is a tag. *But* it doesn’t fetch tags that are not directly accessible from fetched heads, and my guess is that the tags are actually a commit off the branch it tags, like:
* tag
/
—-*—-*—-*—-* HEAD