Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(258)

Unified Diff: git_common.py

Issue 1851283002: Fix coloring madness in depot_tools. (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/depot_tools.git@master
Patch Set: Improve logic a bit Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « git_cl.py ('k') | git_map_branches.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: git_common.py
diff --git a/git_common.py b/git_common.py
index 949ba4695e0437f1ef6b9b078a9fca70f27377f5..bef628e407b16074183928040a33a0bf8bd85bcc 100644
--- a/git_common.py
+++ b/git_common.py
@@ -22,6 +22,7 @@ import functools
import logging
import os
import re
+import setup_color
import shutil
import signal
import sys
@@ -281,7 +282,7 @@ def once(function):
## Git functions
-def blame(filename, revision=None, porcelain=False, *args):
+def blame(filename, revision=None, porcelain=False, *_args):
command = ['blame']
if porcelain:
command.append('-p')
@@ -576,7 +577,7 @@ def less(): # pragma: no cover
Automatically checks if sys.stdout is a non-TTY stream. If so, it avoids
running less and just yields sys.stdout.
"""
- if not sys.stdout.isatty():
+ if not setup_color.IS_TTY:
yield sys.stdout
return
« no previous file with comments | « git_cl.py ('k') | git_map_branches.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698