commit: d3100bd866cb5339b897378894f79bcd51ede89c
Author: Anthony G. Basile <blueness <AT> gentoo <DOT> org>
AuthorDate: Tue Feb 6 11:57:31 2018 +0000
Commit: Anthony G. Basile <blueness <AT> gentoo <DOT> org>
CommitDate: Tue Feb 6 11:57:31 2018 +0000
URL: https://gitweb.gentoo.org/proj/grss.git/commit/?id=d3100bd8
grs/Synchronize.py: checkout the branch before updating the submodule
grs/Synchronize.py | 8 ++++----
1 file 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.
"""