Re: Slow fetches of tags
- From
Junio C Hamano <junkio@cox.net>
- Date
- May 24, 2006, 19:06 UTC
- Message-ID
- <7vhd3f6y4v.fsf@assigned-by-dhcp.cox.net>
- In-Reply-To
- <Pine.LNX.4.64.0605240947580.5623@g5.osdl.org>
Linus Torvalds <torvalds@osdl.org> writes:
> Junio? Any ideas? I didn't want to do that tag-auto-following, and while I > admit it's damn convenient, it's really quite broken, methinks.
I think the current setup is broken on two counts. If you fetch without remote tracking branch, I suspect that we end up asking for the tip of the remote again -- because there is no ref that says "this commit is known to be complete -- we just fetched from them successfully".
But I think what Ralf is seeing is a bit different. The example given:
git fetch git://git.kernel.org/pub/scm/linux/kernel/git/stable/\
linux-2.6.16.y.git master:v2.6.16-stabledoes use a tracking branch, and when the tag following kicks in, v2.6.16-stable head should have been updated. I suspect it is just its head commit is older than tips of other branches, and purely date based sorting done by fetch-pack.c::get_rev() ends up walking them before it gets to the tip of the branch we just fetched.
I wonder if we can do a dirty hack to give bias to commits coming from refs that are newer (on the local filesystem -- that is, mtime of .git/refs/heads/v2.6.16-stable must be a lot newer than .git/refs/heads/master in this case because we just fetched it)...