From: Chris Nehren Date: Sun, 19 Aug 2012 04:09:04 +0000 (+0000) Subject: introspect git repo discovery X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=361ca9d3bd4c3e6a0580a587201d2a8b2182f1e7;p=scpubgit%2FSystem-Introspector.git introspect git repo discovery --- diff --git a/lib/System/Introspector/Probe/Repositories/Git.pm b/lib/System/Introspector/Probe/Repositories/Git.pm index bd5ef23..74fa20d 100644 --- a/lib/System/Introspector/Probe/Repositories/Git.pm +++ b/lib/System/Introspector/Probe/Repositories/Git.pm @@ -12,13 +12,17 @@ has root => ( default => sub { '/' }, ); +sub _log { shift; warn sprintf "[%s] %s\n", scalar(localtime), join '', @_ } + sub gather { my ($self) = @_; + $self->_log("In gather for git repos"); return transform_exceptions { my $pipe = $self->_open_locate_git_config_pipe; my %location; while (defined( my $line = <$pipe> )) { chomp $line; + $self->_log("Got $line from the repos pipe"); next unless $line =~ m{^(.+)/\.git/config$}; my $base = $1; $location{ $base } = $self->_gather_git_info($line);