mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Ahmad Fatoum <a.fatoum@pengutronix.de>
To: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>
Cc: barebox@lists.infradead.org, Roland Hieber <rhi@pengutronix.de>
Subject: Re: [PATCH] pwm: Replace license and copyright boilerplate by SPDX identfiers
Date: Wed, 20 May 2020 19:16:44 +0200	[thread overview]
Message-ID: <8664618e-36ac-1105-4b52-862cda3ee912@pengutronix.de> (raw)
In-Reply-To: <20200520171116.uy25i2thzmwkn6ik@pengutronix.de>

Hello Uwe,

On 5/20/20 7:11 PM, Uwe Kleine-König wrote:
>> You could verify your changes by checking whether /later/ appears
>> in pairs for each hunk:
>>
>> perl -0777 -F'/^@/gm' -ne 'for (@F) { @m = /later/g; print if @m & 1 }' spdx.patch
> 
> I had to read quite some perl docs to understand that. *impressed*

Perl one-liners are a beautiful thing, aren't they? :-)

>>> I just rechecked the other patches I created and this is the only
>>> problematic change.
> 
> Applied on all my patches this only finds the above issue if I use
> --inter-hunk-context=3 (e.g.:
> 
> 	git show --format=fuller --inter-hunk-context=3 1a546e28341b | perl -0777 -F'/^@/gm' -ne 'for (@F) { @m = /later/g; print if @m & 1 }
> 
> ). Without --inter-hunk-context=2 some files have more than one hunk and
> so trigger your test.

Alternatively, you can assume only one license statement per file and
autosplit on the diff --git line, i.e. -F'/^diff/'

Cheers
Ahmad

> 
> Best regards
> Uwe
> 

-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

  reply	other threads:[~2020-05-20 17:16 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-19 16:52 Uwe Kleine-König
2020-05-20 12:09 ` Sascha Hauer
2020-05-20 12:10 ` Ahmad Fatoum
2020-05-20 13:59   ` Uwe Kleine-König
2020-05-20 14:59     ` Ahmad Fatoum
2020-05-20 17:11       ` Uwe Kleine-König
2020-05-20 17:16         ` Ahmad Fatoum [this message]
2020-05-22 12:55   ` Roland Hieber
2020-05-22 13:17     ` Uwe Kleine-König
2020-05-23 14:16       ` Roland Hieber
2020-05-23 15:00         ` Uwe Kleine-König
2020-05-23 15:04           ` Roland Hieber
2020-05-25  5:49           ` Sascha Hauer

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=8664618e-36ac-1105-4b52-862cda3ee912@pengutronix.de \
    --to=a.fatoum@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    --cc=rhi@pengutronix.de \
    --cc=u.kleine-koenig@pengutronix.de \
    /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