(filename)
Return a boolean value for whether the given file is ignored by git.
Return a boolean value for whether the given file is ignored by git.
Return a boolean value for whether the given file is ignored by git .
def ignored_by_git(filename):
    """
    Return a boolean value for whether the given file is ignored by git.
    """
    with chdir(get_root()):
        result = run_command(f'git check-ignore -q {filename}', capture=True)
        return result.code == 0
def ignored_by_git ( filename ) : with chdir ( get_root ( ) ) : result = run_command ( f'git check-ignore -q {filename}' , capture = True ) return result . code == 0