From: Johannes Sixt <j6t@kdbg•org>
To: Adrian Ratiu <adrian.ratiu@collabora•com>
Cc: Junio C Hamano <gitster@pobox•com>,
Patrick Steinhardt <ps@pks•im>,
Emily Shaffer <emilyshaffer@google•com>,
git@vger•kernel.org
Subject: Re: [PATCH v2] ws: add new tab-between-non-ws check
Date: Thu, 8 Jan 2026 09:36:36 +0100 [thread overview]
Message-ID: <5860c8ec-7b34-4c47-926e-67a2c44a654e@kdbg.org> (raw)
In-Reply-To: <87y0m9guns.fsf@collabora.com>
Am 07.01.26 um 19:11 schrieb Adrian Ratiu:
> On Wed, 07 Jan 2026, Johannes Sixt <j6t@kdbg•org> wrote:
>> Am 07.01.26 um 02:30 schrieb Adrian Ratiu:
>>> + git add x &&
>>> + git diff --cached --check &&
>>> +
>>> + git diff --cached --color >raw &&
>>> + test_decode_color <raw >actual &&
>>> + ! test_grep "<GREEN>1234567<RESET><BLUE> <RESET><GREEN>b<RESET>" actual &&
>>
>> This must be
>>
>> test_grep ! "...
>>
>> Furthermore, a negative test with a very tight pattern is often not
>> desired: The test could fail if any single character does not occur
>> (which could easily happen if the test text is changed, but not this
>> pattern). In this case, it would be sufficient to test only that "BLUE"
>> does not occur.
>
> Thanks, I'm still a bit of a noob wrt the git codebase. Will do.
>
>>> + test_grep "<GREEN>1234567 b<RESET>" actual &&
Reconsidering this, we have a positive test for the desired result here.
Then the negative test is redundant, I would think.
-- Hannes
next prev parent reply other threads:[~2026-01-08 8:36 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-07 1:30 [PATCH v2] ws: add new tab-between-non-ws check Adrian Ratiu
2026-01-07 2:12 ` Junio C Hamano
2026-01-07 11:34 ` Adrian Ratiu
2026-01-07 17:33 ` Johannes Sixt
2026-01-07 18:11 ` Adrian Ratiu
2026-01-08 8:36 ` Johannes Sixt [this message]
2026-01-08 9:01 ` Johannes Sixt
2026-01-09 13:33 ` Adrian Ratiu
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=5860c8ec-7b34-4c47-926e-67a2c44a654e@kdbg.org \
--to=j6t@kdbg$(echo .)org \
--cc=adrian.ratiu@collabora$(echo .)com \
--cc=emilyshaffer@google$(echo .)com \
--cc=git@vger$(echo .)kernel.org \
--cc=gitster@pobox$(echo .)com \
--cc=ps@pks$(echo .)im \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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