diff options
author | Junio C Hamano <gitster@pobox.com> | 2021-07-17 03:42:48 +0300 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2021-07-17 03:42:48 +0300 |
commit | 1fb34456580d2556e370bed1ba86fdc8c985ffe6 (patch) | |
tree | bd92e1f78749a711f918c22acbc0c208fd05be4e /builtin | |
parent | b2fc8226294e52c7f08533b202f2b90ce72b7eaf (diff) | |
parent | d65aea37d9b3dd64e29aeb0727c6141f264ce24e (diff) |
Merge branch 'ab/show-branch-tests'
Fill test gaps.
* ab/show-branch-tests:
show-branch tests: add missing tests
show-branch: don't <COLOR></RESET> for space characters
show-branch tests: modernize test code
show-branch tests: rename the one "show-branch" test file
Diffstat (limited to 'builtin')
-rw-r--r-- | builtin/show-branch.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/builtin/show-branch.c b/builtin/show-branch.c index d6d2dabeca..d77ce7aeb3 100644 --- a/builtin/show-branch.c +++ b/builtin/show-branch.c @@ -939,9 +939,12 @@ int cmd_show_branch(int ac, const char **av, const char *prefix) mark = '*'; else mark = '+'; - printf("%s%c%s", - get_color_code(i), - mark, get_color_reset_code()); + if (mark == ' ') + putchar(mark); + else + printf("%s%c%s", + get_color_code(i), + mark, get_color_reset_code()); } putchar(' '); } |