[prev in list] [next in list] [prev in thread] [next in thread] 

List:       gentoo-dev
Subject:    Re: [gentoo-dev] [PATCH 0/2] Add esed.eclass for sed that dies if caused no changes
From:       Jaco Kroon <jaco () uls ! co ! za>
Date:       2022-05-31 14:44:07
Message-ID: 5c192ceb-0f27-bc4c-e1b8-aaf1e30569de () uls ! co ! za
[Download RAW message or body]

Hi,

On 2022/05/31 16:29, Ionen Wolkens wrote:
> esed does bring back the -i/die skipping but that's not its inherent
> purpose and GNU sed currently does not support a mean to report if
> changes occurred (if this happens, esed may well become obsolete too).
>
Haven't checked the code to validate.  But I'm in support of esed eclass
for the sole reason it ensures the sed actually still changes
something.  Not that it verifies the change is actually intended mind
you, so it doesn't completely take away the due diligence checks, but
the verbose options should help devs to ensure the changes are the
intended at testing time.

One *could* also add a change-counter check, eg, count the number of
lines starting with + and - (but not +++ and ---) from diff, and ensure
they match the expected count.  Just to catch further possible cases.

Kind Regards,
Jaco

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic