From 532b5e7cd7fc635e5525a3d7ab986322c22b609b Mon Sep 17 00:00:00 2001
From: Vincent Pelletier <vincent@nexedi.com>
Date: Fri, 25 May 2012 16:28:39 +0200
Subject: [PATCH] More uses of "fetch, reset --hard @{upstream}" instead of
 "pull".

See also 349522b69a12a09642a9f03f5c97bb478a752bfd .
---
 stack/erp5.cfg | 2 +-
 stack/nbd.cfg  | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/stack/erp5.cfg b/stack/erp5.cfg
index 18db92cb9..554d70d34 100644
--- a/stack/erp5.cfg
+++ b/stack/erp5.cfg
@@ -243,7 +243,7 @@ repository = http://git.erp5.org/repos/erp5.git
 branch = erp5-component
 revision =
 command = ${git:location}/bin/git clone --quiet --branch ${:branch} ${:repository} ${:location} && if [ -n "${:revision}" ]; then cd ${:location} && ${git:location}/bin/git reset --quiet --hard ${:revision} ; fi
-update-command = cd ${:location} && GIT_COMMITTER_EMAIL=nobody@example.com GIT_AUTHOR_NAME=Nobody GIT_AUTHOR_EMAIL=nobody@example.com ${git:location}/bin/git pull && if [ -n "${:revision}" ]; then echo "Resetting." ; cd ${:location} && ${git:location}/bin/git reset --hard ${:revision} ; fi
+update-command = cd "${:location}" && "${git:location}/bin/git" fetch && if [ -n "${:revision}" ]; then "${git:location}/bin/git" reset --hard "${:revision}"; else "${git:location}/bin/git" reset --hard @{upstream} ; fi
 
 [products]
 # XXX: ERP5 related products are not defined as python distributions, so it is
diff --git a/stack/nbd.cfg b/stack/nbd.cfg
index 5dde4b493..53ad4232a 100644
--- a/stack/nbd.cfg
+++ b/stack/nbd.cfg
@@ -55,7 +55,7 @@ stop-on-error = true
 command =
   (${git:location}/bin/git clone --quiet http://git.erp5.org/repos/slapos.kvm.git ${:location} ) || (rm -fr ${:location} ; exit 1)
 update-command =
- cd ${:location} && ${git:location}/bin/git pull --quiet origin master
+  cd "${:location}" && "${git:location}/bin/git" fetch --quiet && "${git:location}/bin/git" reset --hard --quiet @{upstream}
 
 [instance-recipe]
 egg = slapos.cookbook
-- 
2.30.9