git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
To: Cogoni Guillaume <cogoni.guillaume@gmail.com>
Cc: Junio C Hamano <gitster@pobox.com>,
	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: Tue, 15 Feb 2022 23:13:11 +0100	[thread overview]
Message-ID: <220215.86a6erwzee.gmgdl@evledraar.gmail.com> (raw)
In-Reply-To: <6fbd4188-3bb5-6d48-fd25-1bdbe9a3cbfb@gmail.com>


On Mon, Feb 14 2022, Cogoni Guillaume wrote:

>>   * 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.

Perhaps it's not a good idea (I haven't checked) to change it like that.

But it's fine to change these sorts of test functions even if there's
existing users of it, our test suite isn't a stable API.

Of course one still has to consider outstanding patches, anything in the
list archive we may want to dig up etc., so it's best not to do so
without good reason.

But the "verifying every use" should mostly be just running "make test",
and pushing to the GitHub CI.

  reply	other threads:[~2022-02-15 22:15 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
2022-02-15 22:13     ` Ævar Arnfjörð Bjarmason [this message]
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

  List information: http://vger.kernel.org/majordomo-info.html

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

  git send-email \
    --in-reply-to=220215.86a6erwzee.gmgdl@evledraar.gmail.com \
    --to=avarab@gmail.com \
    --cc=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.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).