Skip to content

Commit

Permalink
make it more dokuwiki compatible
Browse files Browse the repository at this point in the history
removed the .git directory .. it is not required to get the log and without you can also use "bare" repositories
  • Loading branch information
Andre (Server) committed Nov 26, 2010
1 parent bb0a02e commit 682344a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
4 changes: 2 additions & 2 deletions git-utils.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ function run_git($command, $repo)

$output = array();
$ret = 0;
$c = GIT_EXEC.' --git-dir='.ROOT_DIR.$repo.'/.git '.$command;
$c = GIT_EXEC.' --git-dir='.ROOT_DIR.$repo.'/ '.$command;
exec($c, $output, $ret);
if ($ret != 0) {
//debug
Expand Down Expand Up @@ -38,4 +38,4 @@ function git_get_log($repo, $limit = 10)
}
return $result;
}
?>
?>
11 changes: 6 additions & 5 deletions syntax.php
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
<?php

if(!defined('DOKU_INC')) define('DOKU_INC',realpath(dirname(__FILE__).'/../../').'/');
if(!defined('DOKU_PLUGIN')) define('DOKU_PLUGIN',DOKU_INC.'lib/plugins/');
require_once(DOKU_PLUGIN.'/syntax.php');
// must be run within Dokuwiki
if(!defined('DOKU_INC')) die();

if(!defined('DOKU_PLUGIN')) define('DOKU_PLUGIN',DOKU_INC.'lib/plugins/');
require_once(DOKU_PLUGIN.'syntax.php');

// include git utils, they should be located on same directory with syntax.php
require_once(dirname(__FILE__).'/git-utils.inc.php');
require_once('git-utils.inc.php');

function find_end($string, $offset = 0)
{
Expand Down

0 comments on commit 682344a

Please sign in to comment.