From: Taylor Blau <me@ttaylorr.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: Taylor Blau <me@ttaylorr.com>, git@vger.kernel.org
Subject: Re: [PATCH] t: use LF variable defined in the test harness
Date: Thu, 5 Sep 2019 14:52:43 -0400 [thread overview]
Message-ID: <20190905185243.GA50575@syl.local> (raw)
In-Reply-To: <xmqq7e6mr4iy.fsf@gitster-ct.c.googlers.com>
On Thu, Sep 05, 2019 at 11:17:57AM -0700, Junio C Hamano wrote:
> Taylor Blau <me@ttaylorr.com> writes:
>
> > - t/t3005: this script calls the variable '$new_line', but could be
> > renamed to LF and then removed in a second patch
>
> It is worse than that, isn't it?
>
> If it used $new_line, then it would probably have been a good idea
> to somehow make a separate patch related to this one and make a
> series about "use $LF from test-lib", but ever since its beginning
> at 0f64bfa9 ("ls-files: fix pathspec display on error", 2011-08-01),
> $new_line is assigned once but never used in the script.
Ah, thanks for catching it ;-). I think the patch below the scissors is
totally right; there's obviously no need for a preparatory patch here
other than the one you provided.
> Somebody may want to go clean-up the use of various $sq and $SQ
> locally defined by giving a unified $SQ in test-lib.sh, by the way.
>
> -- >8 --
> Subject: t3005: remove unused variable
>
> Since the beginning of the script, $new_line variable was never used.
> Remove it.
>
> Signed-off-by: Junio C Hamano <gitster@pobox.com>
> ---
> t/t3005-ls-files-relative.sh | 2 --
> 1 file changed, 2 deletions(-)
>
> diff --git a/t/t3005-ls-files-relative.sh b/t/t3005-ls-files-relative.sh
> index 209b4c7cd8..583e467683 100755
> --- a/t/t3005-ls-files-relative.sh
> +++ b/t/t3005-ls-files-relative.sh
> @@ -7,8 +7,6 @@ This test runs git ls-files with various relative path arguments.
>
> . ./test-lib.sh
>
> -new_line='
> -'
> sq=\'
>
> test_expect_success 'prepare' '
Thanks,
Taylor
prev parent reply other threads:[~2019-09-05 18:52 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-09-03 21:11 [PATCH] t: use LF variable defined in the test harness Junio C Hamano
2019-09-04 0:29 ` Taylor Blau
2019-09-05 18:17 ` Junio C Hamano
2019-09-05 18:47 ` Jeff King
2019-09-05 19:34 ` Junio C Hamano
2019-09-05 22:10 ` [PATCH] t: use common $SQ variable Denton Liu
2019-09-05 22:25 ` Taylor Blau
2019-09-05 22:27 ` Taylor Blau
2019-09-06 2:04 ` Denton Liu
2019-09-05 18:52 ` Taylor Blau [this message]
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=20190905185243.GA50575@syl.local \
--to=me@ttaylorr.com \
--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.