|
If you find yourself needing to look for a certain pattern among all sources files in Jenkins and its plugins - anything in https://github.com/jenkinsci - try cloning
http://git.jenkins-ci.org/all.git and then running this handy one-liner in it (replace the "basic"-syntax regexp with whatever you need): git branch -a | xargs git grep 'SomeClass\.staticMethod' | perl -n -e 'print "$repo/$fname: $text\n" if ($repo, $fname, $text) = /^remotes\/origin\/(.+)\/master:([^:]+):(?:[ \t]*)(.+)$/' (This greps files as of the tip of the master branch only. Checking historical versions is much slower.) |
|
Administrator
|
Any chance you can capture this in an Wiki page?
2012/8/22 Jesse Glick <[hidden email]>: > If you find yourself needing to look for a certain pattern among all sources > files in Jenkins and its plugins - anything in https://github.com/jenkinsci > - try cloning http://git.jenkins-ci.org/all.git and then running this handy > one-liner in it (replace the "basic"-syntax regexp with whatever you need): > > git branch -a | xargs git grep 'SomeClass\.staticMethod' | perl -n -e 'print > "$repo/$fname: $text\n" if ($repo, $fname, $text) = > /^remotes\/origin\/(.+)\/master:([^:]+):(?:[ \t]*)(.+)$/' > > (This greps files as of the tip of the master branch only. Checking > historical versions is much slower.) -- Kohsuke Kawaguchi |
|
Is this "all" git repo automaticaly maintained as new plugins are.created / forked on github ? Le 22 août 2012 01:36, "Kohsuke Kawaguchi" <[hidden email]> a écrit :
Any chance you can capture this in an Wiki page? |
|
Administrator
|
Yes. It's updated weekly by
http://ci.jenkins-ci.org/view/Infrastructure/job/infra_backend-merge-all-repo/ 2012/8/22 nicolas de loof <[hidden email]>: > Is this "all" git repo automaticaly maintained as new plugins are.created / > forked on github ? > > Le 22 août 2012 01:36, "Kohsuke Kawaguchi" <[hidden email]> a écrit : > >> Any chance you can capture this in an Wiki page? >> >> 2012/8/22 Jesse Glick <[hidden email]>: >> > If you find yourself needing to look for a certain pattern among all >> > sources >> > files in Jenkins and its plugins - anything in >> > https://github.com/jenkinsci >> > - try cloning http://git.jenkins-ci.org/all.git and then running this >> > handy >> > one-liner in it (replace the "basic"-syntax regexp with whatever you >> > need): >> > >> > git branch -a | xargs git grep 'SomeClass\.staticMethod' | perl -n -e >> > "$repo/$fname: $text\n" if ($repo, $fname, $text) = >> > /^remotes\/origin\/(.+)\/master:([^:]+):(?:[ \t]*)(.+)$/' >> > >> > (This greps files as of the tip of the master branch only. Checking >> > historical versions is much slower.) >> >> >> >> -- >> Kohsuke Kawaguchi -- Kohsuke Kawaguchi |
|
In reply to this post by nicolas de loof-2
Kohsuke Kawaguchi wrote:
> Any chance you can capture this in an Wiki page? Good idea. https://wiki.jenkins-ci.org/display/JENKINS/Grepping+all+sources |
| Powered by Nabble | Edit this page |
