Git development
 help / color / mirror / Atom feed
From: "Hardik Kumar" <hardikxk@gmail.com>
To: "Junio C Hamano" <gitster@pobox.com>,
	"Hardik Kumar" <hardikxk@gmail.com>
Cc: <git@vger.kernel.org>
Subject: Re: [PATCH] t: use test_must_fail instead of NOT operator
Date: Mon, 16 Nov 2026 23:03:43 +0530	[thread overview]
Message-ID: <DMWTDHJGGUD8.2ZZHA8YHM7EU4@gmail.com> (raw)
In-Reply-To: <xmqqcxs4n4k0.fsf@gitster.g>

On Mon Nov 16, 2026 at 9:37 PM IST, Junio C Hamano wrote:
> All of them look sensible, but I am curious why you chose only
> these, among 14 hits in
>
>     $ git grep -l '^[ 	]*! git ' t/
>
> I suspect that it is because these are ...
>
>> -	! git clone -c http.proxy=localhost/path https://example.com/repo.git 2>err && {
>> -	! git clone -c http.proxy=socks4://127.0.0.1/path https://example.com/repo.git 2>err && {
>> -	! git bisect run ./fail.sh 2>err &&
>> -	! git bisect run ./fail.sh 2>err &&
>
> ... simple cases in which the use of leading ! negation is the only
> issue with them, and if that is the reasoning, I think that is
> sensible.  Contrasting these, many of the hits in t2206 (one among
> 14 hits in the above grep), for example, look like this:
>
>   ! git status --porcelain | grep "^.*$" &&
>
> which violates "do not hide exit status of git behind a pipe" rule,
> in addition to have a strange looking leading ! negation.

Yes, I should've mentioned the reason for not replacing the other
instances in the patch reply. I just trying keeping the patch to these
specific cases as they were the obvious standouts.

Thanks.

      reply	other threads:[~2026-11-16 17:33 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-15 18:15 [PATCH] t: use test_must_fail instead of NOT operator Hardik Kumar
2026-11-16 16:07 ` Junio C Hamano
2026-11-16 17:33   ` Hardik Kumar [this message]

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=DMWTDHJGGUD8.2ZZHA8YHM7EU4@gmail.com \
    --to=hardikxk@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    /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