*
* @param string path (can be empty - eg. '')
* @param {number|date} limit how many to fetch
+ *
+ * -- prefered args:
+ *
* @param {string} object = eg. rev|tag|branch (use 'rev' here and ident=HASH to retrieve a speific revision
* @param {string} ident =
*
if ($limit !== null) {
if (is_int($limit)) {
$args[] = "--max-count=$limit";
- } else if (is_array($limit)) {
+ } else if (is_array($limit) && isset($limit[0]) && isset($limit[2])) {
+ $args[] = "--skip={$limit[0]} --max-count={$limit[1]}";
+ } else if (is_array($limit) ) {
+ foreach($line as $k=>$v) {
+ $args[] = ($k = '-') ? '' : ('--'. $k .'='. $v);
+ }
$args[] = "--skip={$limit[0]} --max-count={$limit[1]}";
} else {
+
$args[] = "--since=$limit";
}
}
- print_R(array($args, '--' ,$path));exit;
+ // print_R(array($args, '--' ,$path));exit;
$fp = $this->git('log', $args, '--', $path);
$commits = array();
return $this->git('diff', "$from^..$from", '--', $path);
}
- public function getWorkingCopy()
- {
- require_once 'MTrack/SCM/Git/WorkingCopy.php';
- return new MTrack_SCM_Git_WorkingCopy($this);
- }
+ public function getWorkingCopy()
+ {
+ require_once 'MTrack/SCM/Git/WorkingCopy.php';
+ return new MTrack_SCM_Git_WorkingCopy($this);
+ }
public function getRelatedChanges($revision) // pretty nasty.. could end up with 1000's of changes..
{
var_dump('git ' . join (' ' , $a));
// die("oops");
}
- //print_r($a);
+ // echo "git " . implode(" " , $a) . "\n";
return MTrackSCM::run('git', 'read', $a);
}