* finish task #3128.

This commit is contained in:
wangyidong
2017-08-21 09:08:38 +08:00
parent 653648b3eb
commit 3f431a2110
4 changed files with 18 additions and 2 deletions
+8
View File
@@ -430,6 +430,10 @@ class gitModel extends model
if(count($lists) == 2) list($nowRevision, $preRevision) = $lists;
$cmd = "$this->client diff $preRevision $nowRevision -- $subPath";
$diff = `$cmd`;
$encodings = isset($repo->encodings) ? $repo->encodings : $this->config->svn->encodings;
if($encodings or $encodings != 'utf-8') $diff = helper::convertEncoding($diff, $encodings);
return $diff;
}
@@ -457,6 +461,10 @@ class gitModel extends model
exec("{$this->client} config core.quotepath false");
$cmd = "$this->client show $revision:$subPath";
$code = `$cmd`;
$encodings = isset($repo->encodings) ? $repo->encodings : $this->config->git->encodings;
if($encodings or $encodings != 'utf-8') $code = helper::convertEncoding($code, $encodings);
return $code;
}