aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnthony G. Basile <blueness@gentoo.org>2018-02-06 06:57:31 -0500
committerAnthony G. Basile <blueness@gentoo.org>2018-02-06 06:57:31 -0500
commitd3100bd866cb5339b897378894f79bcd51ede89c (patch)
treec7bca77403fc273c73b686d9653ceb0a19a7563e
parentgrs/Synchronize.py: always re-init submodules (diff)
downloadgrss-d3100bd866cb5339b897378894f79bcd51ede89c.tar.gz
grss-d3100bd866cb5339b897378894f79bcd51ede89c.tar.bz2
grss-d3100bd866cb5339b897378894f79bcd51ede89c.zip
grs/Synchronize.py: checkout the branch before updating the submodule
-rw-r--r--grs/Synchronize.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/grs/Synchronize.py b/grs/Synchronize.py
index 8a55c84..d2d4cb5 100644
--- a/grs/Synchronize.py
+++ b/grs/Synchronize.py
@@ -43,6 +43,10 @@ class Synchronize():
cmd = 'git clone %s %s' % (self.remote_repo, self.local_repo)
Execute(cmd, timeout=60, logfile=self.logfile)
+ # Make sure we're on the correct branch for the desired GRS system.
+ cmd = 'git -C %s checkout %s' % (self.local_repo, self.branch)
+ Execute(cmd, timeout=60, logfile=self.logfile)
+
# If there is a .gitmodules, then init/update the submodules
git_modulesfile = os.path.join(self.local_repo, '.gitmodules')
if os.path.isfile(git_modulesfile):
@@ -53,10 +57,6 @@ class Synchronize():
cmd = 'git -C %s submodule update' % self.local_repo
Execute(cmd, timeout=60, logfile=self.logfile)
- # Make sure we're on the correct branch for the desired GRS system.
- cmd = 'git -C %s checkout %s' % (self.local_repo, self.branch)
- Execute(cmd, timeout=60, logfile=self.logfile)
-
def isgitdir(self):
""" If there is a .git/config file, assume its a local git repository. """