App-GitWorkspaceScanner
view release on metacpan or search on metacpan
lib/App/GitWorkspaceScanner.pm view on Meta::CPAN
=cut
sub get_git_repositories
{
my ( $self ) = @_;
if ( !defined( $self->{'git_repositories'} ) )
{
if ( $self->{'verbose'} )
{
$log->infof( "Running as user '%s'.", getpwuid( $< ) );
$log->infof( "Scanning workspace '%s'.", $self->{'workspace'} );
}
# Find .git directories.
# TODO: convert to not use backticks.
# TODO: find a way to generalize to non-Unix systems.
# TODO: generalize to handle .git repositories that are outside of their
# repos (rare).
$self->{'verbose'} && $log->info( "Locate .git directories." );
my @locate_results = `locate --basename '\\.git'`; ## no critic (InputOutput::ProhibitBacktickOperators)
( run in 0.271 second using v1.01-cache-2.11-cpan-8d75d55dd25 )