Re: [PATCH] pwm: Replace license and copyright boilerplate by SPDX identfiers

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox




[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux