From: Justin J. Novack Date: Tue, 18 Sep 2012 12:09:00 +0000 (-0400) Subject: FIX: Add identity to notes rather than commit X-Git-Tag: v0.3.0~42^2~10 X-Git-Url: https://git.cweiske.de/phorkie.git/commitdiff_plain/4293cbe275bec99763c9fd4bd5df347bd359599f?ds=sidebyside FIX: Add identity to notes rather than commit --- diff --git a/src/phorkie/Repository/Post.php b/src/phorkie/Repository/Post.php index ed44cf1..9119e06 100644 --- a/src/phorkie/Repository/Post.php +++ b/src/phorkie/Repository/Post.php @@ -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,11 @@ class Repository_Post ->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; }