All of lore.kernel.org
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Karthik Nayak <karthik.188@gmail.com>
Cc: git@vger.kernel.org,  peff@peff.net
Subject: Re: [PATCH v2] builtin/push: call set_refspecs after validating remote
Date: Tue, 09 Jul 2024 11:56:49 -0700	[thread overview]
Message-ID: <xmqqsewie6mm.fsf@gitster.g> (raw)
In-Reply-To: <xmqq4j8yflrq.fsf@gitster.g> (Junio C. Hamano's message of "Tue, 09 Jul 2024 11:44:25 -0700")

Junio C Hamano <gitster@pobox.com> writes:

> Is it merely "this is a nonsense request and must fail, but we do
> not want to hit BUG in general"?  I think it is the latter, but
> leaving it unsaid is confusing.  How about starting it more like...

A bit of clarification.  "it is the latter" -> "that is what you
meant".  In any earlier draft I had another possibility but I
removed it before sending the message.

>     When an end-user runs "git push" with an empty string for the
>     remote repository name, e.g.
>
>         $ git push '' main
>
>     "git push" fails with a BUG().  This is because ...
>
> or something.

Another clarificaiton.  

    ... with a BUG().

 ->

    ... with a BUG().  Even though this is a nonsense request that
    we want to fail, we shouldn't hit a BUG().  Instead we want to
    give a sensible error message, e.g., 'bad repository'".

Let's make a habit of not stopping at saying what is bad, and also
saying what we want instead explicitly. 

Thanks.

  reply	other threads:[~2024-07-09 18:57 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-08 14:03 [PATCH] builtin/push: call set_refspecs after validating remote Karthik Nayak
2024-07-08 19:17 ` Junio C Hamano
2024-07-08 23:33   ` Jeff King
2024-07-09  9:59   ` Karthik Nayak
2024-07-08 23:32 ` Jeff King
2024-07-09  9:05   ` Karthik Nayak
2024-07-09  9:59     ` Jeff King
2024-07-09 14:49 ` [PATCH v2] " Karthik Nayak
2024-07-09 18:44   ` Junio C Hamano
2024-07-09 18:56     ` Junio C Hamano [this message]
2024-07-09 23:55     ` Jeff King
2024-07-10  1:04       ` Junio C Hamano
2024-07-10 13:12     ` Karthik Nayak
2024-07-10 15:34       ` Junio C Hamano
2024-07-10 15:46       ` Jeff King
2024-07-11  9:35         ` Karthik Nayak
2024-07-11 21:32           ` Jeff King
2024-07-11  9:39   ` [PATCH v3] " Karthik Nayak
2024-07-11 15:08     ` Junio C Hamano
2024-07-11 21:33       ` 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=xmqqsewie6mm.fsf@gitster.g \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=karthik.188@gmail.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 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.