From: Cogoni Guillaume <cogoni.guillaume@gmail.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org, git.jonathan.bressat@gmail.com,
guillaume.cogoni@gmail.com, matthieu.moy@univ-lyon1.fr
Subject: Re: [PATCH] t/t3903-stash.sh: replace test [-d|-f] with test_path_is_*
Date: Mon, 14 Feb 2022 21:22:42 +0100 [thread overview]
Message-ID: <6fbd4188-3bb5-6d48-fd25-1bdbe9a3cbfb@gmail.com> (raw)
In-Reply-To: <xmqq5yplcme1.fsf@gitster.g>
First of all, sorry for the delay of this answer.
> On 02/11/2022 at 7:02 PM, Junio C Hamano wrote:
>
> This is not wrong per-se, and I know I shouldn't demand too much
> from a practice patch like this, but for a real patch, I hope
> contributors carefully check if the original is doing the right
> thing.
It's good that you are demanding even for a practice patch because we
are here to learn as much as we can. And, we will take a good attention
to your ideas.
> * verify that all existing users of test_path_is_file want to
> reject a symlink to file, and add 'test ! -h "$1" &&' to the
> implementation of the test helper in t/test-lib-functions.sh
> (we may want to do the same for test_path_is_dir).
>
> * introduce test_path_is_symlink and use it appropriately. This
> will be a more verbose version of "test -h".
>
> * introduce test_path_is_file_not_symlink and use it here.
We wouldn't modify test_path_is_file because this function is already
use and we won't verify if every uses of this are rejecting symlink.
However, we would like to try to implement test_path_is_symlink and
test_path_is_file_not_symlink and the symmetric for directory.
Thanks for your review and the ideas.
COGONI Guillaume and BRESSAT Jonathan
next prev parent reply other threads:[~2022-02-14 20:51 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-11 13:46 [PATCH] t/t3903-stash.sh: replace test [-d|-f] with test_path_is_* COGONI Guillaume
2022-02-11 18:02 ` Junio C Hamano
2022-02-14 20:22 ` Cogoni Guillaume [this message]
2022-02-15 22:13 ` Ævar Arnfjörð Bjarmason
2022-02-18 17:10 ` [PATCH v2 0/2] replace test [-f|-d] with more verbose functions COGONI Guillaume
2022-02-18 17:12 ` COGONI Guillaume
2022-02-18 17:12 ` [PATCH v2 1/2] t/t3903-stash.sh: replace test [-d|-f] with test_path_is_* COGONI Guillaume
2022-02-18 17:12 ` [PATCH v2 2/2] Add new tests functions like test_path_is_* COGONI Guillaume
2022-02-18 18:48 ` Junio C Hamano
2022-02-22 21:54 ` [PATCH v3 0/3] replace test [-f|-d] with more verbose functions COGONI Guillaume
2022-02-22 21:54 ` [PATCH v3 1/3] t/t3903-stash.sh: replace test [-d|-f] with test_path_is_* COGONI Guillaume
2022-02-22 21:54 ` [PATCH v3 2/3] tests: allow testing if a path is truly a file or a directory COGONI Guillaume
2022-02-22 21:54 ` [PATCH v3 3/3] tests: make the code more readable COGONI Guillaume
2022-02-23 22:59 ` [PATCH v3 0/3] replace test [-f|-d] with more verbose functions Junio C Hamano
2022-02-24 18:22 ` Cogoni Guillaume
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=6fbd4188-3bb5-6d48-fd25-1bdbe9a3cbfb@gmail.com \
--to=cogoni.guillaume@gmail.com \
--cc=git.jonathan.bressat@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=guillaume.cogoni@gmail.com \
--cc=matthieu.moy@univ-lyon1.fr \
/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).