mirror of
https://git.rtems.org/rtems-source-builder
synced 2024-10-09 07:15:10 +08:00
sb: Add submodule support to the git support.
This commit is contained in:
parent
7c30130169
commit
5601b9ccae
@ -94,6 +94,9 @@ class repo:
|
||||
def checkout(self, branch = 'master'):
|
||||
ec, output = self._run(['checkout', branch], check = True)
|
||||
|
||||
def submodule(self, module):
|
||||
ec, output = self._run(['submodule', 'update', '--init', module], check = True)
|
||||
|
||||
def status(self):
|
||||
_status = {}
|
||||
if path.exists(self.path):
|
||||
@ -109,6 +112,8 @@ class repo:
|
||||
state = 'unstaged'
|
||||
elif l.startswith('# Untracked files:'):
|
||||
state = 'untracked'
|
||||
elif l.startswith('# HEAD detached'):
|
||||
state = 'detached'
|
||||
elif state != 'none' and l[0] == '#':
|
||||
if l.strip() != '#' and not l.startswith('# ('):
|
||||
if state not in _status:
|
||||
|
Loading…
x
Reference in New Issue
Block a user