Merge branch 'milestone' of github.com:jnovack/phorkie into milestone
[phorkie.git] / src / phorkie / Repository / Post.php
index ed44cf1535bd030d2f3ff364e8c4e6d4c23d02b1..b181b5a2b198ef6e52ebe83856c338ec86598b90 100644 (file)
@@ -118,10 +118,11 @@ class Repository_Post
         }
 
         $commitmsg = "phorkie commit";
+
         if (isset($sessionData['identity'])) {
-            $commitmsg .= " from ".$sessionData['identity'];
+            $notes = $sessionData['identity'];
         } else {
-            $commitmsg .= " by ".$sessionData['ipaddr'];
+            $notes = $sessionData['ipaddr'];
         }
 
         if ($bCommit) {
@@ -129,6 +130,12 @@ class Repository_Post
                 ->setOption('message', $commitmsg)
                 ->setOption('author', $sessionData['name'].' <'.$sessionData['email'].'>')
                 ->execute();
+            //FIXME: git needs ref BEFORE add
+            //quick hack until http://pear.php.net/bugs/bug.php?id=19605 is fixed
+            $vc->getCommand('notes --ref=identity add')
+                               ->setOption('force')
+                ->setOption('message', "$notes")
+                ->execute();
             $bChanged = true;
         }