All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
To: git@vger.kernel.org
Cc: "Junio C Hamano" <gitster@pobox.com>,
	"Johannes Schindelin" <Johannes.Schindelin@gmx.de>,
	"Michael J Gruber" <git@grubix.eu>,
	"Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
Subject: [PATCH v2 0/4] show-branch: add missing tests, trivial color output change
Date: Thu, 17 Jun 2021 12:53:34 +0200	[thread overview]
Message-ID: <cover-0.4-0000000000-20210617T105245Z-avarab@gmail.com> (raw)
In-Reply-To: <cover-0.4-00000000000-20210614T171626Z-avarab@gmail.com>

This v2 doesn't change any of the code (see range-diff), but better
explains the change per Michael J Gruber's feedback in
https://lore.kernel.org/git/162374905722.40525.516266574605586007.git@grubix.eu/

There's also a trivial grammar fix, s/add/odd/g.

Ævar Arnfjörð Bjarmason (4):
  show-branch tests: rename the one "show-branch" test file
  show-branch tests: modernize test code
  show-branch: don't <COLOR></RESET> for space characters
  show-branch tests: add missing tests

 builtin/show-branch.c          |   9 +-
 t/t3202-show-branch-octopus.sh |  70 ----------------
 t/t3202-show-branch.sh         | 149 +++++++++++++++++++++++++++++++++
 3 files changed, 155 insertions(+), 73 deletions(-)
 delete mode 100755 t/t3202-show-branch-octopus.sh
 create mode 100755 t/t3202-show-branch.sh

Range-diff against v1:
1:  7b8ac43339 = 1:  7b8ac43339 show-branch tests: rename the one "show-branch" test file
2:  27f94abaed = 2:  27f94abaed show-branch tests: modernize test code
3:  8db7029086 ! 3:  937e728f7f show-branch: fix and test --color output
    @@ Metadata
     Author: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
     
      ## Commit message ##
    -    show-branch: fix and test --color output
    +    show-branch: don't <COLOR></RESET> for space characters
     
    -    Fix the "show-branch --color" output so it doesn't needlessly color
    -    and reset each time it emits a space character.
    +    Change the colored output introduced in ab07ba2a24 (show-branch: color
    +    the commit status signs, 2009-04-22) to not color and reset each
    +    individual space character we use for padding. The intent is to color
    +    just the "!", "+" etc. characters.
    +
    +    This makes the output easier to test, so let's do that now. The test
    +    would be much more verbose without a color/reset for each space
    +    character. Since the coloring cycles through colors we previously had
    +    a "rainbow of space characters".
    +
    +    In theory this breaks things for anyone who's relying on the exact
    +    colored output of show-branch, in practice I'd think anyone parsing it
    +    isn't actively turning on the colored output.
     
         Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
     
4:  c54c6a7b20 ! 4:  dde0177235 show-branch tests: add missing tests
    @@ Commit message
         This fixes a few more blind spots, but there's still a lot of behavior
         that's not tested for.
     
    -    These new tests show the add (and possibly unintentional) behavior of
    +    These new tests show the odd (and possibly unintentional) behavior of
         --merge-base with one argument, and how its output is the same as "git
         merge-base" with N bases in this particular case. See the test added
         in f621a8454d1 (git-merge-base/git-show-branch --merge-base:
-- 
2.32.0.571.gdba276db2c


  parent reply	other threads:[~2021-06-17 10:53 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-14 17:18 [PATCH 0/4] show-branch: add missing tests, trivial color output fix Ævar Arnfjörð Bjarmason
2021-06-14 17:18 ` [PATCH 1/4] show-branch tests: rename the one "show-branch" test file Ævar Arnfjörð Bjarmason
2021-06-14 17:18 ` [PATCH 2/4] show-branch tests: modernize test code Ævar Arnfjörð Bjarmason
2021-06-14 17:18 ` [PATCH 3/4] show-branch: fix and test --color output Ævar Arnfjörð Bjarmason
2021-06-14 17:18 ` [PATCH 4/4] show-branch tests: add missing tests Ævar Arnfjörð Bjarmason
2021-06-15  9:24   ` Michael J Gruber
2021-06-15  3:11 ` [PATCH 0/4] show-branch: add missing tests, trivial color output fix Junio C Hamano
2021-06-17 10:53 ` Ævar Arnfjörð Bjarmason [this message]
2021-06-17 10:53   ` [PATCH v2 1/4] show-branch tests: rename the one "show-branch" test file Ævar Arnfjörð Bjarmason
2021-06-17 21:16     ` Felipe Contreras
2021-06-17 10:53   ` [PATCH v2 2/4] show-branch tests: modernize test code Ævar Arnfjörð Bjarmason
2021-06-17 21:29     ` Felipe Contreras
2021-06-17 10:53   ` [PATCH v2 3/4] show-branch: don't <COLOR></RESET> for space characters Ævar Arnfjörð Bjarmason
2021-06-17 21:41     ` Felipe Contreras
2021-06-17 10:53   ` [PATCH v2 4/4] show-branch tests: add missing tests Ævar Arnfjörð Bjarmason
2021-06-17 21:44     ` Felipe Contreras
2021-06-17 21:46   ` [PATCH v2 0/4] show-branch: add missing tests, trivial color output change Felipe Contreras

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=cover-0.4-0000000000-20210617T105245Z-avarab@gmail.com \
    --to=avarab@gmail.com \
    --cc=Johannes.Schindelin@gmx.de \
    --cc=git@grubix.eu \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.