capture origin/<name> of active branch in case remote is not tracked master
Robert 'phaylon' Sedlacek [Tue, 18 Sep 2012 22:08:04 +0000 (22:08 +0000)]
lib/System/Introspector/Probe/Repositories/Git.pm

index 76b41f1..65b0e9b 100644 (file)
@@ -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,
+            };
+        },
     };
 }