From: Junio C Hamano <gitster@pobox.com>
To: Kostya Farber <kostya.farber@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: [GSoC][PATCH] t/t5000-tar-tree: add helper function
Date: Thu, 02 Feb 2023 14:36:21 -0800 [thread overview]
Message-ID: <xmqqa61vsniy.fsf@gitster.g> (raw)
In-Reply-To: <20230202202557.19297-1-kostya.farber@gmail.com> (Kostya Farber's message of "Thu, 2 Feb 2023 20:25:57 +0000")
Kostya Farber <kostya.farber@gmail.com> writes:
> Add the helper function test_file_path_exists to the
> interpret pax header test. This change makes it clearer
> as to what the test is trying to check, in this case whether
> a file path exists.
Really?
The code with "test -e" is already clear that it is checking if the
path $data exists. This change does not make it any clearer. What
it helps is that it gives a message upon failure, when the test is
run with the "-v" option.
> diff --git a/t/t5000-tar-tree.sh b/t/t5000-tar-tree.sh
> index d473048138..19d5bd0c04 100755
> --- a/t/t5000-tar-tree.sh
> +++ b/t/t5000-tar-tree.sh
> @@ -73,7 +73,7 @@ check_tar() {
> for header in *.paxheader
> do
> data=${header%.paxheader}.data &&
> - if test -h $data || test -e $data
> + if test -h $data || test_file_path_exists $data
> then
> path=$(get_pax_header $header path) &&
> if test -n "$path"
Nothing seems to be adding a new helper whose name is
test_file_path_exists; the patch expects such a helper already
exists and uses it in place for existing "test -e".
Perhaps you meant to say "use test_path_exists" not "add helper" on
the title, and use that function in the patch instead?
Thanks.
next prev parent reply other threads:[~2023-02-02 22:36 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-02 20:25 [GSoC][PATCH] t/t5000-tar-tree: add helper function Kostya Farber
2023-02-02 22:36 ` Junio C Hamano [this message]
2023-02-02 23:09 ` Eric Sunshine
2023-02-02 23:19 ` Eric Sunshine
2023-02-04 15:16 ` Kostya Farber
2023-02-05 17:59 ` Eric Sunshine
2023-02-04 15:12 ` Kostya Farber
2023-02-04 15:04 ` Kostya Farber
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=xmqqa61vsniy.fsf@gitster.g \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=kostya.farber@gmail.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.