lkml.org 
[lkml]   [2021]   [Jul]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 5.10 167/167] xhci: add xhci_get_virt_ep() helper
On Wed, Jul 28, 2021 at 12:10:40PM +0200, Pavel Machek wrote:
> Hi!
>
> > From: Mathias Nyman <mathias.nyman@linux.intel.com>
> >
> > [commit b1adc42d440df3233255e313a45ab7e9b2b74096 upstream]
>
> This is yet another variation in upstream commit making. So far I was
> using these:
>
> ma = re.match(".*Upstream commit ([0-9a-f]*) .*", l)
> if ma:
> m.upstream = ma.group(1)
> ma = re.match("[Cc]ommit ([0-9a-f]*) upstream[.]*", l)
> if ma:
> m.upstream = ma.group(1)
> ma = re.match("[Cc]ommit: ([0-9a-f]*)", l)
> if ma:
> m.upstream = ma.group(1)
>
> I guess I could update second regexp to search anywhere in the
> line.... but at that point it will also match stuff like "commit 1234
> upstream is broken".
>
> Do you have suggestion how to extract upstream sha1 automatically?

I use:
grep -E -o '[0-9a-f]{40}'

\
 
 \ /
  Last update: 2021-07-28 12:20    [W:0.090 / U:0.208 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site