Re: [PATCH stable 4.14 00/23] powerpc backports for 4.14

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

 



Greg KH <greg@xxxxxxxxx> writes:
> On Fri, May 25, 2018 at 09:03:11PM +1000, Michael Ellerman wrote:
>> Michael Ellerman <mpe@xxxxxxxxxxxxxx> writes:
>> > Hi Greg,
>> >
>> > Please queue up this series of patches for 4.14 if you have no objections.
>> 
>> I just realised I didn't fix up the cherry-pick markings on these, so
>> they still say eg:
>> 
>>   (cherry picked from commit bdcb1aefc5b3f7d0f1dc8b02673602bca2ff7a4b)
>> 
>> Not the proper "commit bdcb1... upstream" style.
>> 
>> I'll hold off resending in case you have some sed magic to fix that, but
>> let me know if you'd like me to do it and resend the series.
>
> I don't have any sed magic for that, sorry.  Can you fix up and resend?

No worries.

I just resent them.

Below is a script that does it automatically, if you stick it in
.git/hooks/prepare-commit-msg.

cheers

#!/usr/bin/env python2
#
# prepare-commit-msg hook to rewrite git-cherry-pick style commit markers into
# the preferred form for Linux stable.
#
# ie. (cherry pick from commit abc..) -> commit abc.. upstream

import sys, re

patt = re.compile('(?:cherry picked from commit ([a-fA-F0-9]+))')

lines = open(sys.argv[1], 'r').readlines()
for line in lines:
    match = patt.search(line)
    if match:
        lines.remove(line)
        lines.insert(1, '\ncommit %s upstream.\n' % match.group(1))
        open(sys.argv[1], 'w').writelines(lines)
        break

sys.exit(0)



[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux