From 91ba22bc3209a86d15511f28ed7b436d0cd7fef7 Mon Sep 17 00:00:00 2001 From: Heikki Hokkanen Date: Thu, 11 Jun 2009 16:53:05 +0300 Subject: [PATCH] Run git using --git-dir instead of GIT_DIR. git accepts the git dir two ways: "GIT_DIR=/foo git" and "git --git-dir=/foo" The latter one is more portable, so we use it. According to Robert Persaud, this is needed to get viewgit working on Windows 2003 server cygwin install (but not the only change needed). --- inc/functions.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inc/functions.php b/inc/functions.php index 34bfe35..117fbf7 100644 --- a/inc/functions.php +++ b/inc/functions.php @@ -454,7 +454,7 @@ function run_git($project, $command) global $conf; $output = array(); - $cmd = "GIT_DIR=". $conf['projects'][$project]['repo'] ." ". $conf['git'] ." $command"; + $cmd = $conf['git'] ." --git-dir=". $conf['projects'][$project]['repo'] ." $command"; $ret = 0; exec($cmd, $output, $ret); //if ($ret != 0) { die('FATAL: exec() for git failed, is the path properly configured?'); } -- 2.11.4.GIT