git.cweiske.de
/
phorkie.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
update 0.5.0 changelog
[phorkie.git]
/
src
/
phorkie
/
Repository
/
ConnectionInfo.php
diff --git
a/src/phorkie/Repository/ConnectionInfo.php
b/src/phorkie/Repository/ConnectionInfo.php
index ce96c3e56a044d7651803d1a09b516bce5225bb6..f6a7a40697fef6b52d10cb5ff748654a22fac76c 100644
(file)
--- a/
src/phorkie/Repository/ConnectionInfo.php
+++ b/
src/phorkie/Repository/ConnectionInfo.php
@@
-10,7
+10,10
@@
class Repository_ConnectionInfo
public function __construct(Repository $repo)
{
$this->repo = $repo;
public function __construct(Repository $repo)
{
$this->repo = $repo;
- $this->arConfig = parse_ini_file($this->repo->gitDir . '/config', true);
+ //we need raw parsing; https://bugs.php.net/bug.php?id=68347
+ $this->arConfig = parse_ini_file(
+ $this->repo->gitDir . '/config', true, INI_SCANNER_RAW
+ );
}
public function isFork()
}
public function isFork()
@@
-35,21
+38,21
@@
class Repository_ConnectionInfo
*/
public function getRemote($name)
{
*/
public function getRemote($name)
{
- if (!isset($this->arConfig['remote
' . $name
])) {
+ if (!isset($this->arConfig['remote
"' . $name . '"'
])) {
return null;
}
return null;
}
- return new Repository_Remote($name, $this->arConfig['remote
' . $name
]);
+ return new Repository_Remote($name, $this->arConfig['remote
"' . $name . '"'
]);
}
public function getForks()
{
$arForks = array();
foreach ($this->arConfig as $name => $data) {
}
public function getForks()
{
$arForks = array();
foreach ($this->arConfig as $name => $data) {
- if (substr($name, 0, 1
2) != 'remote
fork-') {
+ if (substr($name, 0, 1
3) != 'remote "
fork-') {
continue;
}
continue;
}
- $arForks[substr($name,
7
)] = new Repository_Remote(
- substr($name,
7
), $data
+ $arForks[substr($name,
8, -1
)] = new Repository_Remote(
+ substr($name,
8, -1
), $data
);
}
return $arForks;
);
}
return $arForks;