From d8b4101eae8d7b650c9fd27d4f6495a032187279 Mon Sep 17 00:00:00 2001 From: bright Date: Sat, 18 May 2024 07:38:46 +0000 Subject: color: fix have_fg not re assign to true MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit In method _parse the value of this variable 'have_fg ' is always False, Maybe reassign it to True is lost. I guess the author’s original intention was: if set some value in gitconfig file(for ex: text = black red ul), the first is bg color, the second is fg color, and the last one is attr. Change-Id: I372698fe625db4c1fdaa94ea7f193a80a850ecb9 Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/425997 Reviewed-by: Mike Frysinger Tested-by: Bright Ma Commit-Queue: Josip Sokcevic --- color.py | 1 + 1 file changed, 1 insertion(+) (limited to 'color.py') diff --git a/color.py b/color.py index 77517156..9d0ce7c3 100644 --- a/color.py +++ b/color.py @@ -210,6 +210,7 @@ class Coloring: if have_fg: bg = a else: + have_fg = True fg = a elif is_attr(a): attr = a -- cgit v1.2.3-54-g00ecf