php8
[web.mtrack] / MTrack / SCM / Git / Event.php
index a6a2a68..4990c98 100644 (file)
@@ -24,6 +24,14 @@ class MTrack_SCM_Git_Event extends MTrackSCMEvent
     public $files;
 
     public $commit;
+    var $tags;
+    var $files_array;
+    
+    var $utime;
+    var $commitday;
+    var $committime;
+    var $commitby;
+    
     /**
      * this is based on the output from git --raw --numstat
      */
@@ -111,14 +119,17 @@ class MTrack_SCM_Git_Event extends MTrackSCMEvent
             $info = preg_split('#\s+#', substr($line ,1), 3);
            //print_r($info);
             $name = $info[2];
+            if (!isset($ent->files[$name])) {
+                $ent->files[$name] = new stdClass; // ??
+            }
+            
             $ent->files[$name]->added = $info[0];            
             $ent->files[$name]->removed = $info[1];
-            
         }
         // fixme..
-        if (!count($ent->branches)) {
-            $ent->branches[] = $this->branch; //'master';
-        }
+        //if (!count($ent->branches)) {
+        //    $ent->branches[] = $this->branch; //'master';
+        //}
         $ent->files_array = array_values($ent->files);
         return $ent;
     }