On Tue, Jun 25, 2013 at 12:54:17AM +0530, Ramkumar Ramachandra wrote:

> Jeff King wrote:
> > Leaving aside the transport API for a minute, you are always going to
> > have this lack-of-information versus time problem. A refspec like ":"
> > says nothing particularly useful, but it can only be expanded once
> > contact is made with the other side (which is what takes time).
> Right, and ':' is special in that aspect; it does not warrant slowing
> down the expansion of refs/heads/*, for instance.  Besides, I suspect
> ':' can be resolved much faster than using push --dry-run.

I think ":" (or "push.default=matching") is the only thing that needs to
actually contact the other side to decide which refs _might_ be pushed.
But to know which refs would _actually_ be pushed (and which ones would
be fast-forwards), you need to know where the remote refs are, which
involves contacting the other side.

In both cases, you could potentially fake it with remote-tracking refs,
if they are available (after all, that is what "git status" is reporting
with its ahead/behind counts, so there is certainly precedent). But it
is important to note that what you see in the preview is not necessarily
what is about to happen in the push, as we get new information on the
remote tips during the push.

> > Yes. I do not have any interest in such an interactive push, but the
> > point is that a potential first step to any confirmation scheme, no
> > matter what you want it to look like, is a hook. You don't seem to want
> > a confirmation scheme, though, due to the wait (and I cannot blame you,
> > as I would not want it either; but then I would not want the extra
> > refspec message you propose, either).
> I'm trying to figure out how to determine what a push will do without
> actually pushing (or --dry-run, which is almost as expensive).  You
> might like to put that information in your prompt instead of stdout,
> but do you agree that the information is worth getting?

To me personally, no, it is not interesting. But that does not mean it
is not interesting to others. I didn't mean to dissuade you from
pursuing the topic, but rather only to qualify the my statements with "I
am probably not the user you are targeting with this feature".

To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to