You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: action/editcommit.php
+11-5Lines changed: 11 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -59,9 +59,10 @@ public function register(EventHandler $controller)
59
59
* @param string path to the file or directory to be commited (required for auto determination only)
60
60
* @return GitRepo instance or null if there is no repo related to fileOrDirPath
61
61
*/
62
-
privatefunctioninitRepo($fileOrDirPath="") {
62
+
privatefunctioninitRepo($fileOrDirPath = "")
63
+
{
63
64
global$conf;
64
-
65
+
65
66
//set the path to the git binary
66
67
$gitPath = trim($this->getConf('gitPath'));
67
68
if ($gitPath !== '') {
@@ -89,7 +90,9 @@ private function initRepo($fileOrDirPath="") {
89
90
}
90
91
// Validate that the git repoPath found is within or below the DokuWiki 'savedir' configured:
91
92
if (strpos(realpath($repoPath), realpath($conf['savedir'])) === false) {
92
-
//dbglog("GitBacked - WARNING: repoPath=" . $repoPath . " is above the configured savedir=" . realpath($conf['savedir'])." => this git repo will be ignored!");
93
+
//dbglog("GitBacked - WARNING: repoPath=" . $repoPath . " is above the configured savedir="
94
+
// . realpath($conf['savedir']) . " => this git repo will be ignored!"
95
+
//);
93
96
returnnull;
94
97
}
95
98
$repoWorkDir = '';
@@ -99,7 +102,10 @@ private function initRepo($fileOrDirPath="") {
99
102
// the repoPath configured.
100
103
if (realpath($configuredRepoPath) === realpath($repoPath)) {
101
104
$repoWorkDir = $configuredRepoWorkDir;
102
-
//dbglog("GitBacked - INFO: repoPath=" . $repoPath . " is the one explicitly configured => we use the configured workDir=[" . $repoWorkDir . "]");
thrownewException($this->handleRepoPathError($this->repo_path, "Failure on GitRepo->runCommand(): Git command must not be run for an empty repo path"));
278
+
thrownew \Exception($this->handleRepoPathError(
279
+
$this->repo_path,
280
+
"Failure on GitRepo->runCommand(): Git command must not be run for an empty repo path"
0 commit comments