From: Robert 'phaylon' Sedlacek Date: Tue, 18 Sep 2012 22:08:04 +0000 (+0000) Subject: capture origin/ of active branch in case remote is not tracked X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=356497eeee25f6f67c94cc4b5357bffc67bc3a62;p=scpubgit%2FSystem-Introspector.git capture origin/ of active branch in case remote is not tracked --- diff --git a/lib/System/Introspector/Probe/Repositories/Git.pm b/lib/System/Introspector/Probe/Repositories/Git.pm index 76b41f1..65b0e9b 100644 --- a/lib/System/Introspector/Probe/Repositories/Git.pm +++ b/lib/System/Introspector/Probe/Repositories/Git.pm @@ -62,6 +62,16 @@ sub _gather_current_state { return { branch => $active_branch, commit => [@log_lines], + origin => transform_exceptions { + my $count = $self->_find_commit_count( + $git_dir, + $active_branch, + "origin/$active_branch", + ); + return { + local_commit_count => $count, + }; + }, }; }