Thread (7 messages) flat view 7 messages, 3 authors, 2016-06-15

Re: [PATCH] Allow update hooks to update refs on their own

From: Jeff King <hidden>
Date: 2016-06-15 22:43:54

Possibly related (same subject, not in this thread)

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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help