git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Csókás Bence" <csokas.bence@prolan.hu>
To: Junio C Hamano <gitster@pobox.com>
Cc: <git@vger.kernel.org>
Subject: Re: [PATCH v2] git-send-email: Use sanitized address when reading mbox body
Date: Thu, 27 Jun 2024 10:37:06 +0200	[thread overview]
Message-ID: <f245c5e8-b986-49f1-91fe-7e24593e8e85@prolan.hu> (raw)
In-Reply-To: <xmqqy16r1ulu.fsf@gitster.g>

On 6/26/24 19:28, Junio C Hamano wrote:
>> diff --git a/t/t9001-send-email.sh b/t/t9001-send-email.sh
>> index 58699f8e4e..7e0b8ae57c 100755
>> --- a/t/t9001-send-email.sh
>> +++ b/t/t9001-send-email.sh
> 
> This test uses mixture of test_grep and grep, so use of "grep" below
> is fine (but in the longer term we should make sure the tests use
> the former for better debuggability).

Ok, I'll use test_grep everywhere.

> As I always say, we should resist the temptation to write our tests
> just to demonstrate our shiny new toy.  In this case, the test is
> too focused to show that the system will give a best-effort output
> when fed invalid and/or malformed addresses, but it does not see
> what happens to a well formed addresses (ideally they are passed
> intact, but is that what happens with the new code?).  Perhaps add
> one or two trailer lines with valid addresses (and non-address, like
> "BugId: 143421", that should not appear at all in the output) on
> them?

Valid addresses are already tested by former tests. I don't immediately 
see any tests that would cover non-Cc, non-*-by and non-email-address 
tags, so I might add them; should they be a separate testcase or part of 
this one? Or maybe even a separate patch?

Bence


  reply	other threads:[~2024-06-27  8:43 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-26 13:24 [PATCH v2] git-send-email: Use sanitized address when reading mbox body Csókás, Bence
2024-06-26 17:28 ` Junio C Hamano
2024-06-27  8:37   ` Csókás Bence [this message]
2024-06-27 15:09     ` Junio C Hamano

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=f245c5e8-b986-49f1-91fe-7e24593e8e85@prolan.hu \
    --to=csokas.bence@prolan.hu \
    --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;
as well as URLs for NNTP newsgroup(s).