From c72f20a4155c93d103da89769f50ceac839e2402 Mon Sep 17 00:00:00 2001
From: Herman van Rink <rink@initfour.nl>
Date: Tue, 8 May 2012 13:33:38 +0200
Subject: [PATCH 2/2] Differentiate between site and platform

---
 provision_git.drush.inc |   17 ++++++++++++++---
 1 files changed, 14 insertions(+), 3 deletions(-)

diff --git a/provision_git.drush.inc b/provision_git.drush.inc
index 48f17fb..c28f636 100644
--- a/provision_git.drush.inc
+++ b/provision_git.drush.inc
@@ -43,7 +43,12 @@ function provision_git_drush_command() {
  */
 function provision_git_is_repo($repo_path = NULL){
   if (!$repo_path){
-    $repo_path = d()->platform->root;
+    if (d()->type === 'site') {
+      $repo_path = d()->site_path;
+    }
+    else {
+      $repo_path = d()->platform->root;
+    }
   }
 
   //If shell returns False, this is not a git repo
@@ -85,8 +90,14 @@ function drush_provision_pre_provision_git_reset(){
  * Implements the provision-git-pull command.
  */
 function drush_provision_git_pull() {
-  $repo_path = d()->platform->root;
-  $target = d()->platform->name;
+  if (d()->type === 'site') {
+    $repo_path = d()->site_path;
+    $target = d()->name;
+  }
+  else {
+    $repo_path = d()->platform->root;
+    $target = d()->platform->name;
+  }
   
   //Only git reset --hard if option says so.
   if (drush_get_option('reset') == TRUE){
-- 
1.7.4.1

