[Fusionforge-commits] FusionForge branch Branch_5_1 updated. 975a4f3fd89de3e10f5a921521fa10dd926681db

Thorsten Glaser mirabilos at fusionforge.org
Mon Feb 25 10:56:17 CET 2013


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "FusionForge".

The branch, Branch_5_1 has been updated
       via  975a4f3fd89de3e10f5a921521fa10dd926681db (commit)
      from  deb656eb52310014ac9fa2cacd7df95fa1c4cf42 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 975a4f3fd89de3e10f5a921521fa10dd926681db
Author: Thorsten Glaser <tg at mirbsd.org>
Date:   Mon Feb 25 10:56:00 2013 +0100

    I think is_file("$main_repo/HEAD") gives a warning if !is_dir($main_repo)

diff --git a/src/plugins/scmgit/common/GitPlugin.class.php b/src/plugins/scmgit/common/GitPlugin.class.php
index a8f9544..86901aa 100644
--- a/src/plugins/scmgit/common/GitPlugin.class.php
+++ b/src/plugins/scmgit/common/GitPlugin.class.php
@@ -321,7 +321,8 @@ class GitPlugin extends SCMPlugin {
                 system ("mkdir -p $root") ;
 
 		$main_repo = $root . '/' .  $project_name . '.git' ;
-		if (!is_file ("$main_repo/HEAD") && !is_dir("$main_repo/objects") && !is_dir("$main_repo/refs")) {
+		if (!is_dir($main_repo) || (!is_file("$main_repo/HEAD") &&
+		    !is_dir("$main_repo/objects") && !is_dir("$main_repo/refs"))) {
 			$tmp_repo = util_mkdtemp('.git', $project_name);
 			if ($tmp_repo == false) {
 				return false;

-----------------------------------------------------------------------

Summary of changes:
 src/plugins/scmgit/common/GitPlugin.class.php |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)


hooks/post-receive
-- 
FusionForge



More information about the Fusionforge-commits mailing list