git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Patrick Steinhardt <ps@pks.im>
To: shejialuo <shejialuo@gmail.com>
Cc: git@vger.kernel.org, Eric Sunshine <sunshine@sunshineco.com>,
	Junio C Hamano <gitster@pobox.com>
Subject: Re: [PATCH v4 1/1] [PATCH] t9117: prefer test_path_* helper functions
Date: Mon, 4 Mar 2024 10:59:18 +0100	[thread overview]
Message-ID: <ZeWbdvFmhUYN9ekE@tanuki> (raw)
In-Reply-To: <20240304095436.56399-2-shejialuo@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 2327 bytes --]

On Mon, Mar 04, 2024 at 05:54:36PM +0800, shejialuo wrote:
> test -(e|d) does not provide a nice error message when we hit test
> failures, so use test_path_exists, test_path_is_dir instead.
> 
> Signed-off-by: shejialuo <shejialuo@gmail.com>

This version looks good to me, thanks!

One suggestion for potential future contributions by you: it's always
helpful to create a "range-diff" of what has changed between the
previous version of your patch series and the next one. Like this,
reviewers can immediately see what the difference is between the two
versions, which helps them to get the review done faster.

Assuming you use git-format-patch(1) you can generate such a range diff
with the `--range-diff=` parameter.

Patrick

> ---
>  t/t9117-git-svn-init-clone.sh | 16 ++++++++--------
>  1 file changed, 8 insertions(+), 8 deletions(-)
> 
> diff --git a/t/t9117-git-svn-init-clone.sh b/t/t9117-git-svn-init-clone.sh
> index 62de819a44..3b038c338f 100755
> --- a/t/t9117-git-svn-init-clone.sh
> +++ b/t/t9117-git-svn-init-clone.sh
> @@ -17,32 +17,32 @@ test_expect_success 'setup svnrepo' '
>  test_expect_success 'basic clone' '
>  	test ! -d trunk &&
>  	git svn clone "$svnrepo"/project/trunk &&
> -	test -d trunk/.git/svn &&
> -	test -e trunk/foo &&
> +	test_path_is_dir trunk/.git/svn &&
> +	test_path_exists trunk/foo &&
>  	rm -rf trunk
>  	'
>  
>  test_expect_success 'clone to target directory' '
>  	test ! -d target &&
>  	git svn clone "$svnrepo"/project/trunk target &&
> -	test -d target/.git/svn &&
> -	test -e target/foo &&
> +	test_path_is_dir target/.git/svn &&
> +	test_path_exists target/foo &&
>  	rm -rf target
>  	'
>  
>  test_expect_success 'clone with --stdlayout' '
>  	test ! -d project &&
>  	git svn clone -s "$svnrepo"/project &&
> -	test -d project/.git/svn &&
> -	test -e project/foo &&
> +	test_path_is_dir project/.git/svn &&
> +	test_path_exists project/foo &&
>  	rm -rf project
>  	'
>  
>  test_expect_success 'clone to target directory with --stdlayout' '
>  	test ! -d target &&
>  	git svn clone -s "$svnrepo"/project target &&
> -	test -d target/.git/svn &&
> -	test -e target/foo &&
> +	test_path_is_dir target/.git/svn &&
> +	test_path_exists target/foo &&
>  	rm -rf target
>  	'
>  
> -- 
> 2.44.0
> 

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  reply	other threads:[~2024-03-04  9:59 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-29 15:04 [GSoC][PATCH 0/1] microproject: Use test_path_is_* functions in test scripts shejialuo
2024-02-29 15:04 ` [PATCH 1/1] [GSoC][PATCH] t3070: refactor test -e command shejialuo
2024-02-29 17:58   ` Eric Sunshine
2024-02-29 19:06     ` Junio C Hamano
2024-03-04  9:16       ` [PATCH] SoC 2024: clarify `test_path_is_*` conversion microproject Patrick Steinhardt
2024-03-04 13:42         ` Christian Couder
2024-03-04 17:02         ` Junio C Hamano
2024-03-04  9:17       ` [PATCH 1/1] [GSoC][PATCH] t3070: refactor test -e command Patrick Steinhardt
2024-03-01  2:50     ` shejialuo
2024-03-01  3:46 ` [PATCH V2 0/1] [GSoC][PATCH] t9117: prefer test_path_* helper functions shejialuo
2024-03-01  3:46   ` [PATCH 1/1] " shejialuo
2024-03-01  4:44     ` Eric Sunshine
2024-03-01 11:29       ` shejialuo
2024-03-01  5:09     ` Junio C Hamano
2024-03-01 11:36       ` shejialuo
2024-03-01 13:03   ` [PATCH v3 0/1] " shejialuo
2024-03-01 13:03     ` [PATCH v3 1/1] [PATCH] " shejialuo
2024-03-04  9:24       ` Patrick Steinhardt
2024-03-04  9:54     ` [PATCH v4 0/1] Change commit message shejialuo
2024-03-04  9:54       ` [PATCH v4 1/1] [PATCH] t9117: prefer test_path_* helper functions shejialuo
2024-03-04  9:59         ` Patrick Steinhardt [this message]
2024-03-04 11:45           ` shejialuo
2024-03-04 17:50           ` Junio C Hamano
2024-03-04 17:22         ` Junio C Hamano
2024-03-05 11:42           ` shejialuo
2024-03-04 17:19       ` [PATCH v4 0/1] Change commit message Junio C Hamano

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=ZeWbdvFmhUYN9ekE@tanuki \
    --to=ps@pks.im \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=shejialuo@gmail.com \
    --cc=sunshine@sunshineco.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 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).