|
|
@ -2,6 +2,8 @@
|
|
|
|
from __future__ import (absolute_import, division, print_function)
|
|
|
|
from __future__ import (absolute_import, division, print_function)
|
|
|
|
__metaclass__ = type
|
|
|
|
__metaclass__ = type
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import re
|
|
|
|
|
|
|
|
|
|
|
|
from . import types as t
|
|
|
|
from . import types as t
|
|
|
|
|
|
|
|
|
|
|
|
from .util import (
|
|
|
|
from .util import (
|
|
|
@ -35,6 +37,13 @@ class Git:
|
|
|
|
cmd = ['diff', '--name-only', '--no-renames', '-z'] + args
|
|
|
|
cmd = ['diff', '--name-only', '--no-renames', '-z'] + args
|
|
|
|
return self.run_git_split(cmd, '\0')
|
|
|
|
return self.run_git_split(cmd, '\0')
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def get_submodule_paths(self): # type: () -> t.List[str]
|
|
|
|
|
|
|
|
"""Return a list of submodule paths recursively."""
|
|
|
|
|
|
|
|
cmd = ['submodule', 'status', '--recursive']
|
|
|
|
|
|
|
|
output = self.run_git_split(cmd, '\n')
|
|
|
|
|
|
|
|
submodule_paths = [re.search(r'^.[0-9a-f]+ (?P<path>[^ ]+)', line).group('path') for line in output]
|
|
|
|
|
|
|
|
return submodule_paths
|
|
|
|
|
|
|
|
|
|
|
|
def get_file_names(self, args):
|
|
|
|
def get_file_names(self, args):
|
|
|
|
"""
|
|
|
|
"""
|
|
|
|
:type args: list[str]
|
|
|
|
:type args: list[str]
|
|
|
|