Fixed bad owner/user config, causing pastes to fail with 'Please tell me who you...
[phorkie.git] / src / phorkie / Repository / Setup.php
index f5c9730f77c259ec0bb2f888cf3d49ac487c08a2..d62cdb89cf3b9cd431ce4acc098a26a8637281bf 100644 (file)
@@ -27,13 +27,25 @@ class Repository_Setup
 
         $vc = $this->repo->getVc();
 
+        file_put_contents(
+            $this->repo->gitDir . '/hooks/post-update',
+            <<<CDE
+#!/bin/sh
+# Hook script to prepare a packed repository for use over dumb transports.
+
+exec git update-server-info
+
+CDE
+        );
+        chmod($this->repo->gitDir . '/hooks/post-update', 0755);
+
         //keep track of owner
         $vc->getCommand('config')
-            ->addArgument('owner.name')
+            ->addArgument('user.name')
             ->addArgument($_SESSION['name'])
             ->execute();
         $vc->getCommand('config')
-            ->addArgument('owner.email')
+            ->addArgument('user.email')
             ->addArgument($_SESSION['email'])
             ->execute();
     }