removed redundant data structure part in commit count
[scpubgit/System-Introspector.git] / lib / System / Introspector / Probe / Repositories / Git.pm
index 38e39b9..bd5ef23 100644 (file)
@@ -64,35 +64,35 @@ sub _find_tracking {
                     $self->_find_changes($dir, $local, $remote);
                 },
                 local_commit_count => transform_exceptions {
-                    $self->_find_commits($dir, $local, $remote);
+                    $self->_find_commit_count($dir, $local, $remote);
                 },
             }
         }
         else {
-            return { error => join "\n", @lines };
+            return { __error__ => join "\n", @lines };
         }
     }
     return { branches => \%branch };
 }
 
-sub _find_commits {
+sub _find_commit_count {
     my ($self, $dir, $local, $remote) = @_;
-    return { error => "No remote" }
+    return { __error__ => "No remote" }
         unless defined $remote;
     local $ENV{GIT_DIR} = $dir;
     my @lines = lines_from_command
         ['git', 'log', '--oneline', "$remote..$local"];
-    return { count => scalar @lines };
+    return scalar @lines;
 }
 
 sub _find_changes {
     my ($self, $dir, $local, $remote) = @_;
-    return { error => "No remote" }
+    return { __error__ => "No remote" }
         unless defined $remote;
     local $ENV{GIT_DIR} = $dir;
     my @lines = lines_from_command
         ['git', 'diff', '--name-only', $local, $remote];
-    return { list => \@lines };
+    return \@lines;
 }
 
 sub _gather_git_config {