MTrack/SCM/Git/CommitHookBridge.php
[web.mtrack] / MTrack / SCM / Git / CommitHookBridge.php
index bbb4f9d..fbab57b 100644 (file)
@@ -30,7 +30,7 @@ class MTrack_SCM_Git_CommitHookBridge extends  IMTrackCommitHookBridge
   
             $fp = $this->repo->git(
                 'log', '--no-color', '--name-status',
-                '--date=rfc', $ref, "$old..$new");
+                '--date=rfc',  "$old..$new"); //$ref, used to be in here??  - but it breaks stuff...
                 
                 
             $props = array();
@@ -38,13 +38,13 @@ class MTrack_SCM_Git_CommitHookBridge extends  IMTrackCommitHookBridge
             if (!preg_match("/^commit\s+(\S+)$/", $line)) {
                 throw new Exception("unexpected output from git log: $line");
             }
-            
+            $this->props = array();
             // read key: value properties like Author: / Date: 
             while (($line = fgets($fp)) !== false) {
                 $line = rtrim($line);
                 if (!strlen($line)) break;
                 if (preg_match("/^(\S+):\s*(.*)\s*$/", $line, $M)) {
-                    $props[$M[1]] = $M[2];
+                    $this->props[$M[1]] = $M[2];
                 }
             }
             // read the commit log.
@@ -67,6 +67,7 @@ class MTrack_SCM_Git_CommitHookBridge extends  IMTrackCommitHookBridge
               
             } while (($line = fgets($fp)) !== false);
         }
+        print_r($this);exit;
     }