Take into account if in one branch but listing another.
Need to check how this is working on a bar repository.
This commit is contained in:
parent
c915f8fccf
commit
789c7ed43d
@ -69,9 +69,11 @@ class IDF_Git
|
|||||||
$cmd = sprintf('GIT_DIR=%s git-ls-tree -t -l %s', $this->repo, $base->hash);
|
$cmd = sprintf('GIT_DIR=%s git-ls-tree -t -l %s', $this->repo, $base->hash);
|
||||||
exec($cmd, &$out);
|
exec($cmd, &$out);
|
||||||
$rawlog = array();
|
$rawlog = array();
|
||||||
$cmd = sprintf('GIT_DIR=%s git log --raw --abbrev=40 --pretty=oneline',
|
foreach ($this->getBranches() as $br) {
|
||||||
$this->repo);
|
$cmd = sprintf('GIT_DIR=%s git log --raw --abbrev=40 --pretty=oneline %s',
|
||||||
|
$this->repo, $br);
|
||||||
exec($cmd, &$rawlog);
|
exec($cmd, &$rawlog);
|
||||||
|
}
|
||||||
$rawlog = implode("\n", array_reverse($rawlog));
|
$rawlog = implode("\n", array_reverse($rawlog));
|
||||||
$current_dir = getcwd();
|
$current_dir = getcwd();
|
||||||
chdir(substr($this->repo, 0, -5));
|
chdir(substr($this->repo, 0, -5));
|
||||||
@ -193,6 +195,7 @@ class IDF_Git
|
|||||||
escapeshellarg($this->repo), $n, $format, $tree);
|
escapeshellarg($this->repo), $n, $format, $tree);
|
||||||
$out = array();
|
$out = array();
|
||||||
exec($cmd, &$out);
|
exec($cmd, &$out);
|
||||||
|
//print_r($cmd);
|
||||||
return self::parseLog($out, 4);
|
return self::parseLog($out, 4);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -58,9 +58,12 @@ class IDF_Views_Source
|
|||||||
$tree = $match[2];
|
$tree = $match[2];
|
||||||
$cobject = '';
|
$cobject = '';
|
||||||
$tree_in = in_array($tree, $branches);
|
$tree_in = in_array($tree, $branches);
|
||||||
foreach ($git->getChangeLog('', null) as $change) {
|
foreach ($branches as $br) {
|
||||||
|
foreach ($git->getChangeLog($br, null) as $change) {
|
||||||
if ($change->tree == $tree) {
|
if ($change->tree == $tree) {
|
||||||
$cobject = $change;
|
$cobject = $change;
|
||||||
|
break 2;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return Pluf_Shortcuts_RenderToResponse('source/tree.html',
|
return Pluf_Shortcuts_RenderToResponse('source/tree.html',
|
||||||
@ -98,9 +101,12 @@ class IDF_Views_Source
|
|||||||
$prev = split('/', $request_file);
|
$prev = split('/', $request_file);
|
||||||
$l = array_pop($prev);
|
$l = array_pop($prev);
|
||||||
$previous = substr($request_file, 0, -strlen($l.' '));
|
$previous = substr($request_file, 0, -strlen($l.' '));
|
||||||
foreach ($git->getChangeLog('', null) as $change) {
|
foreach ($branches as $br) {
|
||||||
|
foreach ($git->getChangeLog($br, null) as $change) {
|
||||||
if ($change->tree == $tree) {
|
if ($change->tree == $tree) {
|
||||||
$cobject = $change; //$git->getCommit($tree);
|
$cobject = $change;
|
||||||
|
break 2;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return Pluf_Shortcuts_RenderToResponse('source/tree.html',
|
return Pluf_Shortcuts_RenderToResponse('source/tree.html',
|
||||||
|
Loading…
Reference in New Issue
Block a user