All of lore.kernel.org
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Jeff King <peff@peff.net>
Cc: Dmitry <wipedout@yandex.ru>, git@vger.kernel.org
Subject: Re: [PATCH 0/3] push: detect local refspec errors early
Date: Wed, 05 Mar 2014 12:51:06 -0800	[thread overview]
Message-ID: <xmqqsiqwfjyd.fsf@gitster.dls.corp.google.com> (raw)
In-Reply-To: <20140305190248.GB31252@sigill.intra.peff.net> (Jeff King's message of "Wed, 5 Mar 2014 14:02:48 -0500")

Jeff King <peff@peff.net> writes:

> We can't fully process the refspecs until we have talked to the other
> side, because they may involve matching refs from the remote; I don't
> think git even really looks at them until after we've connected.
>
> But I think there are some obvious cases, like a bogus left-hand side
> (i.e., what you have here) that cannot ever succeed, no matter what the
> other side has. We could sanity check the refspecs before doing anything
> else.

The user's wallclock time is more important than machine cycles,
checking things we could check before having the user do things is a
good principle to follow.

I wish that the solution did not have to involve doing the same
computation twice, but I do not think there is a clean way around
that in this codepath.

Thanks.

  parent reply	other threads:[~2014-03-05 20:51 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-05  9:36 git push first asks for credentials, then checks the branch exists Dmitry
2014-03-05 19:02 ` [PATCH 0/3] push: detect local refspec errors early Jeff King
2014-03-05 19:03   ` [PATCH 1/3] match_explicit: hoist refspec lhs checks into their own function Jeff King
2014-03-05 19:03   ` [PATCH 2/3] match_explicit_lhs: allow a "verify only" mode Jeff King
2014-03-05 19:04   ` [PATCH 3/3] push: detect local refspec errors early Jeff King
2014-03-05 20:51   ` Junio C Hamano [this message]
2014-03-05 20:56     ` [PATCH 0/3] " 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=xmqqsiqwfjyd.fsf@gitster.dls.corp.google.com \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=peff@peff.net \
    --cc=wipedout@yandex.ru \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.