Daniel Barkalow <barkalow@xxxxxxxxxxxx> writes: > On Sat, 28 Apr 2007, Junio C Hamano wrote: > >> We are indeed pretending. Consider: >> >> (1) You push, and push succeeds. >> >> (2) Somebody fetches your result, works on it and pushes back; >> this might happen in post-receive hook. >> >> (3) You fetch. You should see somebody else's commit at the >> tip, not what you pushed in (1). >> >> By not fetching but instead of storing what you pushed, you are >> pretending that you re-fetched so fast that you gave no chance >> to anybody to perform (2) quickly enough. > > But you did effectively re-fetch instantaneously by doing an operation > that atomicly updates the ref and reports success. I do not think there is much point arguing over this; I am not fundamentally opposed to keeping a copy of what we just pushed to the other side. But I think it needs to be documented that hooks on the remote side could do funny things, and probably we should strongly discourage people from doing such. You do need to take care of the case where we are _not_ tracking the remote side, though (i.e. lack of colon in the fetch refspecs). - To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html