From: Ramkumar Ramachandra <artagnon@gmail.com>
To: Jeff King <peff@peff.net>
Cc: Git List <git@vger.kernel.org>, Junio C Hamano <gitster@pobox.com>
Subject: Re: [PATCH] push: give early feedback
Date: Tue, 25 Jun 2013 00:54:17 +0530 [thread overview]
Message-ID: <CALkWK0mEWkXpsaUtMLc4r6vufDdSSdsX_PARwmObCSPW1mgAmQ@mail.gmail.com> (raw)
In-Reply-To: <20130624185546.GA25306@sigill.intra.peff.net>
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 do not personally think the "early" information is particularly
> useful. I don't have a problem with it as part of "-v" output (or
> enabled by config), but it seems useless for enough cases (e.g., user
> gave explicit refspecs, or refspecs are not useful without being
> expanded) that showing it by default is going to be considered noisy
> cruft by many users.
>
> Was the unconditional nature of your earlier patch meant to be part of
> the final version, or was it just illustrative?
Very much illustrative. The finer details of when exactly we should
show it can be discussed later.
>> Yes, ^C is a hack, but it's useful in practice (there is ofcourse no
>> guarantee): I've been saved many times by it. The only way to prevent
>> the race is to wait (either indefinitely for some user-input or for N
>> seconds), but I don't want to trade of speed.
>
> I have had the opposite experience. Many times I tried "rm -v" to keep
> an eye on what was being removed, but I do not recall once where I
> frantically reached for the keyboard in time to make a difference. But
> of course that is anecdotal, and push can be somewhat slower.
push is an all-or-nothing network operation that has significant
startup time (name resolution etc.), very much unlike "rm -v". Again,
I'm talking about "in practice" *in the context of push*; not making
any statements about the general usefulness or correctness of ^C.
> 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?
next prev parent reply other threads:[~2013-06-24 19:25 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-24 17:41 [PATCH] push: give early feedback Ramkumar Ramachandra
2013-06-24 18:04 ` Fredrik Gustafsson
2013-06-24 18:24 ` Junio C Hamano
2013-06-24 18:28 ` Jeff King
2013-06-24 18:42 ` Ramkumar Ramachandra
2013-06-24 18:55 ` Jeff King
2013-06-24 19:24 ` Ramkumar Ramachandra [this message]
2013-06-24 19:39 ` Jeff King
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CALkWK0mEWkXpsaUtMLc4r6vufDdSSdsX_PARwmObCSPW1mgAmQ@mail.gmail.com \
--to=artagnon@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=peff@peff.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).