lkml.org 
[lkml]   [2012]   [Dec]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: how to look for source code in kernel
From
Date
On Fri, 2012-12-28 at 16:09 +0000, Al Viro wrote:
> On Thu, Dec 27, 2012 at 11:36:13PM -0800, Eric W. Biederman wrote:
> > But then I am probably peculiar keeping an index of the source code in
> > my head. When I need to look for something and I don't know where to
> > find it I do.
> >
> > git-ls-files | xargs fgrep 'struct f2fs_inode'
>
> What's wrong with git grep?

Positive: it loads multiple cpus with very little file I/O
Negative: it doesn't use -P very well.
it won't spans lines like:

struct name
{

with git grep -P "\bstruct\s+\w+\s*{"

(the last grep that does I believe is 2.54)




\
 
 \ /
  Last update: 2012-12-28 22:41    [W:0.064 / U:1.440 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site