From: Junio C Hamano <gitster@pobox.com>
To: "Derrick Stolee via GitGitGadget" <gitgitgadget@gmail.com>
Cc: git@vger.kernel.org, johannes.schindelin@gmx.de,
Derrick Stolee <derrickstolee@github.com>
Subject: Re: [PATCH] add: check color.ui for interactive add
Date: Tue, 06 Jun 2023 10:01:53 +0900 [thread overview]
Message-ID: <xmqqsfb54d4u.fsf@gitster.g> (raw)
In-Reply-To: <pull.1541.git.1685994164018.gitgitgadget@gmail.com> (Derrick Stolee via GitGitGadget's message of "Mon, 05 Jun 2023 19:42:43 +0000")
"Derrick Stolee via GitGitGadget" <gitgitgadget@gmail.com> writes:
> +test_expect_success 'colors can be skipped with color.ui=false' '
> + git reset --hard &&
> + test_when_finished "git rm -f color-test" &&
> + test_write_lines context old more-context >color-test &&
> + git add color-test &&
> + test_write_lines context new more-context another-one >color-test &&
> +
> + test_write_lines help quit >input &&
> + force_color git \
> + -c color.ui=false \
> + add -i >actual.raw <input &&
> + test_decode_color <actual.raw >actual &&
It is a minor thing, but for expected output that _wants_ to be
indented in a non-standard way, it would be prudent to protect the
lines from "git apply --whitespace=fix" and in-transit corruption,
perhaps doing something like ...
> + cat >expect <<-\EOF &&
> + staged unstaged path
> + 1: +3/-0 +2/-1 color-test
> +
> + *** Commands ***
... this.
sed -e "s/^|//" >expect <<-\EOF &&
| staged unstaged path
| 1: +3/-0 +2/-1 color-test
|
|*** Commands ***
Although this patch does not add such lines, the same principle
applies to expected output lines that _wants_ to have trailing
whitespaces.
Thanks.
next prev parent reply other threads:[~2023-06-06 1:01 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-05 19:42 [PATCH] add: check color.ui for interactive add Derrick Stolee via GitGitGadget
2023-06-06 1:01 ` Junio C Hamano [this message]
2023-06-06 1:05 ` Junio C Hamano
2023-06-06 2:13 ` Jeff King
2023-06-06 13:32 ` Derrick Stolee
2023-06-06 14:20 ` [PATCH v2] " Derrick Stolee via GitGitGadget
2023-06-07 11:09 ` Phillip Wood
2023-06-07 13:33 ` Derrick Stolee
2023-06-12 17:09 ` Junio C Hamano
2023-06-07 13:44 ` [Patch v2 2/2] add: test use of brackets when color is disabled Derrick Stolee
2023-06-07 15:31 ` Phillip Wood
2023-06-12 17:13 ` Junio C Hamano
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=xmqqsfb54d4u.fsf@gitster.g \
--to=gitster@pobox.com \
--cc=derrickstolee@github.com \
--cc=git@vger.kernel.org \
--cc=gitgitgadget@gmail.com \
--cc=johannes.schindelin@gmx.de \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).