MTrack/SCM/Git/Repo.php
[web.mtrack] / MTrack / SCM / Git / Repo.php
index 2c93a2f..b7a9270 100644 (file)
@@ -242,26 +242,26 @@ HOOK;
         } else {
             $args[] = "master";
         }
-       
-    
+     
         if ($limit !== null) {
             if (is_int($limit)) {
                 $args[] = "--max-count=$limit";
-            } else if (is_array($limit) && isset($limit[0]) && isset($limit[2])) {
+            } else if (is_array($limit) && isset($limit[0]) && isset($limit[1])) {
                 
                 $args[] = "--skip={$limit[0]} --max-count={$limit[1]}";
                 
                 
             /// oh what a horible hack.. - bad api design here.
-            } else if ($limit ) {
+            } else if (is_array($limit) ) {
                 foreach($limit as $k=>$v) {
                      
                     $args[] = ($k == '-') ? $v : ('--'. $k .'='. $v);
                     
                 }
                  
-            } else {
-                    
+            } else if (strpos($limit,'..') !== false ) {
+                 $args[] = $limit;
+            } else {   
                 $args[] = "--since=$limit";
             }
         }
@@ -387,7 +387,7 @@ HOOK;
               var_dump('git ' . join (' ' , $a));
             //  die("oops");
           }
-         // echo "git " . implode(" " , $a) . "\n";
+          echo "git " . implode(" " , $a) . "\n";
           return MTrackSCM::run('git', 'read', $a);
     }