On Wed, Sep 18, 2013 at 11:13:34AM -0400, Michael Greb wrote: > I wrote a bit of code last night to find the path of all git repos > under a given directory (such as ~).
I wrote one a while back, https://github.com/mca-wtsi/git-yacontrib/blob/master/bin/git-enumerate-repos it's not on CPAN because the majority of its siblings are grubby little shell scripts. There is something similar buried inside gitweb, which can search under GITWEB_PROJECTROOT - http://git-scm.com/book/ch4-6.html . Last time I tried it on ~/ by NFS, it(!) was slow. There are other tools for dealing with collections of repositories http://joeyh.name/code/mr/ https://metacpan.org/module/GitMeta https://metacpan.org/module/DINOMITE/App-CmdDirs-1.02/bin/cmddirs https://metacpan.org/module/Git::Bunch https://metacpan.org/module/Git::Megapull (?) which might be relevant? > [...] what's a proper name for such a beast? After looking at the > various git things on the CPAN, I'm thinking Git::Locate or > Git::LocateRepos. What say you fine madams and sirs? Git::LocateRepos sounds good to me. Alternative suggestions Git::EnumerateRepos Git::Repos::Enumerate [moved down, since I now digress] > I did a quick cursory check of the CPAN first and didn't see > anything [...] I didn't regard CPAN as my primary source of Git tools, so I don't look there - unless the subject matter is Perl-specific. By way of analogy, when I see a tool that says it installs with gem install cooltool I mutter "hmm, wonder what else there is?" before proceeding. While I was writing Ruby code, it was as easy as "cpanm Cooler::Tool" but now I have returned those bits to the bitbucket and don't feel like getting them out again. It seems symmetrical to assume that it can happen the other way around. However both CPAN & RubyGems are useful stepping stones to other installers like dpkg, in a way that the adhoc junk in my git-yacontrib is not. Now I have another script to add to my grubby collection, which I cast as a modulino. It should probably go in CPAN. Maybe I should fatpack it into git-yacontrib? It languishes on a private branch. This all seems like a lot True Laziness, compared to the much quicker false laziness of ln -snv "$src/bin" "$dest/,git-yacontrib" for leaf in $( cat "$src/$instand" ); do ln -snv ",git-yacontrib/$leaf" "$dest" done Any suggestions? -- Matthew -- The Wellcome Trust Sanger Institute is operated by Genome Research Limited, a charity registered in England with number 1021457 and a company registered in England with number 2742969, whose registered office is 215 Euston Road, London, NW1 2BE.