[evolvis-commits] r18686: scmgit: Permit branch deletion in personal repositories

mirabilos at evolvis.org mirabilos at evolvis.org
Thu Oct 4 15:45:22 CEST 2012


Author: mirabilos
Date: 2012-10-04 15:45:21 +0200 (Thu, 04 Oct 2012)
New Revision: 18686

Modified:
   trunk/gforge_base/evolvisforge-5.1/src/debian/changelog
   trunk/gforge_base/evolvisforge-5.1/src/plugins/scmgit/common/GitPlugin.class.php
Log:
scmgit: Permit branch deletion in personal repositories

Not, never, in group repos. That is a recipe for data loss
and history corruption.

Modified: trunk/gforge_base/evolvisforge-5.1/src/debian/changelog
===================================================================
--- trunk/gforge_base/evolvisforge-5.1/src/debian/changelog	2012-10-04 11:23:49 UTC (rev 18685)
+++ trunk/gforge_base/evolvisforge-5.1/src/debian/changelog	2012-10-04 13:45:21 UTC (rev 18686)
@@ -24,8 +24,9 @@
   * [#3191] Fix sending out tracker mails when a value is empty
   * [#3189] Correct de and en versions of EvolvisForge blurb
   * Never display template groups in project list
+  * scmgit: Permit branch deletion in personal repositories
 
- -- Thorsten Glaser <t.glaser at tarent.de>  Thu, 04 Oct 2012 13:21:36 +0200
+ -- Thorsten Glaser <t.glaser at tarent.de>  Thu, 04 Oct 2012 14:14:33 +0200
 
 fusionforge (1:5.1.1+evolvis70.1) unstable; urgency=high
 

Modified: trunk/gforge_base/evolvisforge-5.1/src/plugins/scmgit/common/GitPlugin.class.php
===================================================================
--- trunk/gforge_base/evolvisforge-5.1/src/plugins/scmgit/common/GitPlugin.class.php	2012-10-04 11:23:49 UTC (rev 18685)
+++ trunk/gforge_base/evolvisforge-5.1/src/plugins/scmgit/common/GitPlugin.class.php	2012-10-04 13:45:21 UTC (rev 18686)
@@ -422,6 +422,9 @@
 				if (is_file ("$repodir/hooks/post-update")) {
 					system ("chmod +x $repodir/hooks/post-update") ;
 				}
+				system("GIT_DIR=\"$repodir\" git config receive.denyNonFastforwards true");
+				system("GIT_DIR=\"$repodir\" git config receive.denyDeletes false");
+				system("GIT_DIR=\"$repodir\" git update-server-info");
 				system("echo \"Git repository for user $user_name in project $project_name\" > $repodir/description");
 				system ("chown -R $user_name:$unix_group $repodir") ;
 			}



More information about the evolvis-commits mailing list