From: Jeff King Date: Wed, 28 Nov 2007 20:22:50 GMT Subject: Re: [PATCH] Allow update hooks to update refs on their own Message-ID: <20071128202250.GA12777@coredump.intra.peff.net> In-Reply-To: On Wed, Nov 28, 2007 at 12:16:27PM -0800, Steven Grimm wrote: > Well, actually, I would still like opinions on one thing: What do people > think of having git-push do a fetch if the remote side changes a ref to > point to a revision that doesn't exist locally? Is there a situation where > you'd ever want to *not* do that? It can be slow, since you have to make another connection to the server, so clearly it should only be done when you detect an update (which I think is what you're proposing). A raw "git-fetch" might pull a lot of extra cruft that you didn't want to get right now. So if you did do it, I think it would make sense to construct a set of refspecs that match only the ones which need pulling (i.e., in update_tracking_ref, rather than doing the update, construct a refspec of "local:tracking", and then hand all such refspecs to git-fetch). -Peff