Gentoo Archives: gentoo-commits

From: "Anthony G. Basile" <blueness@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/grss:master commit in: grs/
Date: Tue, 06 Feb 2018 11:57:46
Message-Id: 1517918251.d3100bd866cb5339b897378894f79bcd51ede89c.blueness@gentoo
1 commit: d3100bd866cb5339b897378894f79bcd51ede89c
2 Author: Anthony G. Basile <blueness <AT> gentoo <DOT> org>
3 AuthorDate: Tue Feb 6 11:57:31 2018 +0000
4 Commit: Anthony G. Basile <blueness <AT> gentoo <DOT> org>
5 CommitDate: Tue Feb 6 11:57:31 2018 +0000
6 URL: https://gitweb.gentoo.org/proj/grss.git/commit/?id=d3100bd8
7
8 grs/Synchronize.py: checkout the branch before updating the submodule
9
10 grs/Synchronize.py | 8 ++++----
11 1 file changed, 4 insertions(+), 4 deletions(-)
12
13 diff --git a/grs/Synchronize.py b/grs/Synchronize.py
14 index 8a55c84..d2d4cb5 100644
15 --- a/grs/Synchronize.py
16 +++ b/grs/Synchronize.py
17 @@ -43,6 +43,10 @@ class Synchronize():
18 cmd = 'git clone %s %s' % (self.remote_repo, self.local_repo)
19 Execute(cmd, timeout=60, logfile=self.logfile)
20
21 + # Make sure we're on the correct branch for the desired GRS system.
22 + cmd = 'git -C %s checkout %s' % (self.local_repo, self.branch)
23 + Execute(cmd, timeout=60, logfile=self.logfile)
24 +
25 # If there is a .gitmodules, then init/update the submodules
26 git_modulesfile = os.path.join(self.local_repo, '.gitmodules')
27 if os.path.isfile(git_modulesfile):
28 @@ -53,10 +57,6 @@ class Synchronize():
29 cmd = 'git -C %s submodule update' % self.local_repo
30 Execute(cmd, timeout=60, logfile=self.logfile)
31
32 - # Make sure we're on the correct branch for the desired GRS system.
33 - cmd = 'git -C %s checkout %s' % (self.local_repo, self.branch)
34 - Execute(cmd, timeout=60, logfile=self.logfile)
35 -
36
37 def isgitdir(self):
38 """ If there is a .git/config file, assume its a local git repository. """