コード例 #1
0
def color_diff_flags():
    """Return the Git flags for coloured diff output if allowed."""
    stdout_is_tty = (sys.stdout.isatty() and 'true') or 'false'
    if config.get_colorbool('color.diff', stdout_is_tty) == 'true':
        return ['--color']
    else:
        return []
コード例 #2
0
ファイル: common.py プロジェクト: miracle2k/stgit
def color_diff_flags():
    """Return the git flags for coloured diff output if the configuration and
    stdout allows."""
    stdout_is_tty = (sys.stdout.isatty() and "true") or "false"
    if config.get_colorbool("color.diff", stdout_is_tty) == "true":
        return ["--color"]
    else:
        return []
コード例 #3
0
ファイル: common.py プロジェクト: GymWenFLL/tpp_libs
def color_diff_flags():
    """Return the git flags for coloured diff output if the configuration and
    stdout allows."""
    stdout_is_tty = (sys.stdout.isatty() and 'true') or 'false'
    if config.get_colorbool('color.diff', stdout_is_tty) == 'true':
        return ['--color']
    else:
        return []