this walks a path or paths, finds all of the git repositories, and their origins
callback style
var findrepos = require('find-git-repos');
findrepos('../',function(err,repos){
console.log('all of my repos! ',repos);
});
event emitter style
// with event emitter
var em = findrepos('../../');
em.on('repo',function(repo,remote){
console.log('found repo ',remote,' at ',repo);
});
em.on('end',function(){
console.log('all done!');
})
em.on('error',function(){
console.log('the path i specified must not exist or is in accesible');
});
findrepos(path or an array of paths,callback)
- returns EventEmitter finder
- callback(err,repos) repos is an object keyed off of the directory with the remote origin as the values
emitter events repo the repostory info (repo dir, repo remote)
end im done looking no arguments
error if any paths are inaccessable (the error)