(pattern=None, contains=None)
return list(filter(regex.search, result))
Return a list of all the tags in the git repo matching a regex passed in
    `pattern`. If `pattern` is None, return all the tags.
Return a list of all the tags in the git repo matching a regex passed in
    `pattern`. If `pattern` is None, return all the tags.
Return a list of all the tags in the git repo matching a regex passed in pattern . If pattern is None return all the tags .
def git_tag_list(pattern=None, contains=None):
    """
    Return a list of all the tags in the git repo matching a regex passed in
    `pattern`. If `pattern` is None, return all the tags.
    """
    with chdir(get_root()):
        cmd = ['git', 'tag']
        if contains:
            cmd.extend(['--contains', contains])
        result = run_command(cmd, capture=True).stdout
        result = result.splitlines()

    if not pattern:
        return result

    regex = re.compile(pattern)
    return list(filter(regex.search, result))
def git_tag_list ( pattern = None , contains = None ) : with chdir ( get_root ( ) ) : cmd = [ 'git' , 'tag' ] if contains : cmd . extend ( [ '--contains' , contains ] ) result = run_command ( cmd , capture = True ) . stdout result = result . splitlines ( ) if not pattern : return result regex = re . compile ( pattern ) return list ( filter ( regex . search , result ) )