* change for git and report.

This commit is contained in:
wangyidong
2015-07-30 09:03:58 +08:00
parent 09aa6eb818
commit bc45adf37c
2 changed files with 3 additions and 3 deletions

View File

@@ -406,7 +406,7 @@ class gitModel extends model
chdir($repo->path);
$subPath = substr($path, strlen($repo->path) + 1);
$subPath = ltrim(DIRECTORY_SEPARATOR, $subPath);
$subPath = ltrim('/', $subPath);
exec("$this->client rev-list -n 2 $revision -- $subPath", $lists);
if(count($lists) == 2) list($nowRevision, $preRevision) = $lists;
$cmd = "$this->client diff $preRevision $nowRevision -- $subPath";
@@ -437,7 +437,7 @@ class gitModel extends model
$path = str_replace('%5C', '\\', $path);
$subPath = substr($path, strlen($repo->path) + 1);
$subPath = ltrim(DIRECTORY_SEPARATOR, $subPath);
$subPath = ltrim('/', $subPath);
chdir($repo->path);
$cmd = "$this->client show $revision:$subPath";
$code = `$cmd`;