diff options
Diffstat (limited to 'grs')
-rw-r--r-- | grs/Synchronize.py | 8 |
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. """ |