(git_dir, log_count=1)
Using shell, get the active submodule info
Using shell, get the active submodule info
Using shell get the active submodule info
def sub_git_submodules(git_dir, log_count=1):
    """
    Using shell, get the active submodule info
    """
    args =['submodule', 'status' ]
    with sub_git_cmd(git_dir, args) as p:
        gitout = p.stdout.read().decode('utf-8').strip()

    for x in gitout:
        splits = x.strip().split(' ')
        if len(splits) == 3:
            sub_sha = splits[0].strip()
            sub_path = splits[1]
            sub_log = get_git_sub_info(git_dir, sub_path, log_count=log_count)
            sub_log['path'] = sub_path
            sub_log['branch'] = splits[2]
            sub_log['sha_sha'] = sub_sha
            yield sub_log
def sub_git_submodules ( git_dir , log_count = 1 ) : args = [ 'submodule' , 'status' ] with sub_git_cmd ( git_dir , args ) as p : gitout = p . stdout . read ( ) . decode ( 'utf-8' ) . strip ( ) for x in gitout : splits = x . strip ( ) . split ( ' ' ) if len ( splits ) == 3 : sub_sha = splits [ 0 ] . strip ( ) sub_path = splits [ 1 ] sub_log = get_git_sub_info ( git_dir , sub_path , log_count = log_count ) sub_log [ 'path' ] = sub_path sub_log [ 'branch' ] = splits [ 2 ] sub_log [ 'sha_sha' ] = sub_sha yield sub_log