Fixed issue 235, need consistent use of file and fullpath in the SCM backend

This commit is contained in:
Loic d'Anterroches
2009-06-19 15:51:31 +02:00
parent b320375d60
commit a15107558c
4 changed files with 12 additions and 21 deletions

View File

@@ -223,21 +223,6 @@ class IDF_Scm_Git extends IDF_Scm
return trim($out[0]);
}
/**
* Given a commit hash returns an array of files in it.
*
* A file is a class with the following properties:
*
* 'perm', 'type', 'size', 'hash', 'file'
*
* @param string Commit ('HEAD')
* @param string Base folder ('')
* @return array
*/
public function filesAtCommit($commit='HEAD', $folder='')
{
}
/**
* Get the tree info.
*
@@ -286,10 +271,11 @@ class IDF_Scm_Git extends IDF_Scm
foreach ($out as $line) {
list($perm, $type, $hash, $size, $file) = preg_split('/ |\t/', $line, 5, PREG_SPLIT_NO_EMPTY);
if ($totest == $file) {
$pathinfo = pathinfo($file);
return (object) array('perm' => $perm, 'type' => $type,
'size' => $size, 'hash' => $hash,
'fullpath' => $file,
'file' => $file);
'file' => $pathinfo['basename']);
}
}
return false;