File inc/git.inc.php changed (mode: 100644) (index a76f6d6..5a441f9) |
... |
... |
function rg_git_update_ref($ref, $old, $new, $reason) |
432 |
432 |
/* |
/* |
433 |
433 |
* Returns a tree (git ls-tree) |
* Returns a tree (git ls-tree) |
434 |
434 |
*/ |
*/ |
435 |
|
function rg_git_ls_tree($tree, $path) |
|
|
435 |
|
function rg_git_ls_tree($repo_path, $tree, $path) |
436 |
436 |
{ |
{ |
437 |
437 |
rg_prof_start("git_ls_tree"); |
rg_prof_start("git_ls_tree"); |
438 |
|
rg_log_enter("rg_git_ls_tree: tree=$tree path=$path"); |
|
|
438 |
|
rg_log_enter("rg_git_ls_tree: repo_path=$repo_path" |
|
439 |
|
. " tree=$tree path=$path"); |
439 |
440 |
|
|
440 |
441 |
$ret = FALSE; |
$ret = FALSE; |
441 |
442 |
while (1) { |
while (1) { |
|
... |
... |
function rg_git_ls_tree($tree, $path) |
445 |
446 |
$tree = " HEAD"; |
$tree = " HEAD"; |
446 |
447 |
} |
} |
447 |
448 |
|
|
448 |
|
$cmd = "git ls-tree --long" . $op . $tree; |
|
|
449 |
|
$cmd = "git --git-dir=" . escapeshellarg($repo_path) |
|
450 |
|
. " ls-tree --long" . $op . $tree; |
449 |
451 |
if (!empty($path)) |
if (!empty($path)) |
450 |
452 |
$cmd .= " " . escapeshellarg($path); |
$cmd .= " " . escapeshellarg($path); |
451 |
453 |
rg_log("DEBUG: cmd=$cmd"); |
rg_log("DEBUG: cmd=$cmd"); |
File inc/user/repo-page.php changed (mode: 100644) (index d97eee9..90ae5c1) |
... |
... |
if (strcmp($_subop, "history") == 0) { |
157 |
157 |
// find hash of blob |
// find hash of blob |
158 |
158 |
$_path = implode("/", $paras); |
$_path = implode("/", $paras); |
159 |
159 |
$rg['path'] = "/" . $_path; |
$rg['path'] = "/" . $_path; |
160 |
|
$_tree = rg_git_ls_tree($ref, $_path); |
|
|
160 |
|
$_tree = rg_git_ls_tree($repo_path, $ref, $_path); |
161 |
161 |
if ($_tree === FALSE) { |
if ($_tree === FALSE) { |
162 |
162 |
$_repo_body .= "Invalid path!"; |
$_repo_body .= "Invalid path!"; |
163 |
163 |
} else { |
} else { |