FIX: Add identity to notes rather than commit
authorJustin J. Novack <jnovack@gmail.com>
Tue, 18 Sep 2012 12:09:00 +0000 (08:09 -0400)
committerJustin J. Novack <jnovack@gmail.com>
Tue, 18 Sep 2012 12:09:00 +0000 (08:09 -0400)
src/phorkie/Repository/Post.php

index ed44cf1535bd030d2f3ff364e8c4e6d4c23d02b1..9119e06c2ce0f1484351dc63ce688060898cbecf 100644 (file)
@@ -118,10 +118,11 @@ class Repository_Post
         }
 
         $commitmsg = "phorkie commit";
         }
 
         $commitmsg = "phorkie commit";
+
         if (isset($sessionData['identity'])) {
         if (isset($sessionData['identity'])) {
-            $commitmsg .= " from ".$sessionData['identity'];
+            $notes = $sessionData['identity'];
         } else {
         } else {
-            $commitmsg .= " by ".$sessionData['ipaddr'];
+            $notes = $sessionData['ipaddr'];
         }
 
         if ($bCommit) {
         }
 
         if ($bCommit) {
@@ -129,6 +130,11 @@ class Repository_Post
                 ->setOption('message', $commitmsg)
                 ->setOption('author', $sessionData['name'].' <'.$sessionData['email'].'>')
                 ->execute();
                 ->setOption('message', $commitmsg)
                 ->setOption('author', $sessionData['name'].' <'.$sessionData['email'].'>')
                 ->execute();
+            //FIXME: git needs ref BEFORE add. ideally VersionControl_Git needs to be updated
+            $vc->getCommand('notes --ref=identity add')
+                               ->setOption('force')
+                ->setOption('message', "$notes")
+                ->execute();
             $bChanged = true;
         }
 
             $bChanged = true;
         }