From: vincenzo mezzela <vincenzo.mezzela@gmail.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org
Subject: Re: [GSOC][RFC] microproject: use test_path_is_* functions in test scripts
Date: Wed, 14 Feb 2024 11:20:06 +0100 [thread overview]
Message-ID: <CAF2+nma0HZUPevhT7A4vM0rFYF07eF_u9Sg2wRAQ8E2+qBj5uQ@mail.gmail.com> (raw)
In-Reply-To: <xmqqy1bo5k5h.fsf@gitster.g>
> One thing to note is that you'd need to make sure if "test -e" for
> example originally written really means "we want to see something
> there and it does not matter if it is a file or a directory" while
> turning it into test_path_exists. The operations that such a test
> follows may be expected to create a file and never a directory, in
> which case the condition the original code is testing may need to
> be corrected first to expect a more specific type (e.g. "test -f").
> The same comment applies for the other two.
Thanks for this clarification!
> Some tests check with "! test -f <path>", which often would want to
> be turned into "test_path_is_missing", but you'd need to make sure
> that is what the original test really meant to do.
I'd have changed them into:
- ! test -f <path> --> ! test_path_is_file <path>
- ! test -e <path> --> test_path_is_missing <path>
Since '! test -f <path>' and 'test_path_is_missing <path>' can return
different values.
But as you said, I'll check what they are really meant to do and
modify them accordingly :)
>
> A microproject is not about "doing the real work to help the
> project". It is a practice session to come up with a set of small
> changes and explain them well, to send the result to the list to get
> reviewed, to respond to reviews and possibly send updates, and to
> repeat the cycle until completion. So most likely you'd pick a
> single file or two and do the above conversion, while leaving the
> others as practice material for other GSoC participants.
>
> Enjoy.
>
Thanks for this clarification too. :)
Vincenzo
prev parent reply other threads:[~2024-02-14 10:20 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-13 15:44 [GSOC][RFC] microproject: use test_path_is_* functions in test scripts Vincenzo MEZZELA
2024-02-13 17:35 ` Christian Couder
2024-02-13 17:39 ` Eric Sunshine
2024-02-13 17:49 ` Junio C Hamano
2024-02-14 10:20 ` vincenzo mezzela [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
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=CAF2+nma0HZUPevhT7A4vM0rFYF07eF_u9Sg2wRAQ8E2+qBj5uQ@mail.gmail.com \
--to=vincenzo.mezzela@gmail.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.
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).