* [PATCH] t9803-git-p4-shell-metachars.sh: update to use test_path_* functions
@ 2024-03-20 19:48 Sanchit Jindal via GitGitGadget
2024-03-20 20:35 ` Eric Sunshine
2024-03-20 20:46 ` Junio C Hamano
0 siblings, 2 replies; 4+ messages in thread
From: Sanchit Jindal via GitGitGadget @ 2024-03-20 19:48 UTC (permalink / raw
To: git; +Cc: Sanchit Jindal, sanchit1053
From: sanchit1053 <sanchit1053@gmail.com>
Signed-off-by: sanchit1053 <sanchit1053@gmail.com>
---
t9803-git-p4-shell-metachars.sh: update to use test_path_* functions
I have updated the statements test [!] -[e|f] with the corresponding
test_path_* functions The statements are at the end of their respective
texts and can be easily replaced
I am having trouble with the git send-email and my institutes firewall,
that is why I am trying to use gitgitgadget
Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-1700%2Fsanchit1053%2Fsj%2Ft8903_use_path_helper_fn-v1
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-1700/sanchit1053/sj/t8903_use_path_helper_fn-v1
Pull-Request: https://github.com/gitgitgadget/git/pull/1700
t/t9803-git-p4-shell-metachars.sh | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/t/t9803-git-p4-shell-metachars.sh b/t/t9803-git-p4-shell-metachars.sh
index 2913277013d..4905ed2ae9e 100755
--- a/t/t9803-git-p4-shell-metachars.sh
+++ b/t/t9803-git-p4-shell-metachars.sh
@@ -33,8 +33,8 @@ test_expect_success 'shell metachars in filenames' '
(
cd "$cli" &&
p4 sync ... &&
- test -e "file with spaces" &&
- test -e "foo\$bar"
+ test_path_exists "file with spaces" &&
+ test_path_exists "foo\$bar"
)
'
@@ -52,8 +52,8 @@ test_expect_success 'deleting with shell metachars' '
(
cd "$cli" &&
p4 sync ... &&
- test ! -e "file with spaces" &&
- test ! -e foo\$bar
+ test_path_is_missing "file with spaces" &&
+ test_path_is_missing foo\$bar
)
'
@@ -100,8 +100,8 @@ test_expect_success 'branch with shell char' '
git p4 clone --dest=. --detect-branches //depot@all &&
git log --all --graph --decorate --stat &&
git reset --hard p4/depot/branch\$3 &&
- test -f shell_char_branch_file &&
- test -f f1
+ test_path_is_file shell_char_branch_file &&
+ test_path_is_file f1
)
'
base-commit: 3bd955d26919e149552f34aacf8a4e6368c26cec
--
gitgitgadget
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] t9803-git-p4-shell-metachars.sh: update to use test_path_* functions
2024-03-20 19:48 [PATCH] t9803-git-p4-shell-metachars.sh: update to use test_path_* functions Sanchit Jindal via GitGitGadget
@ 2024-03-20 20:35 ` Eric Sunshine
2024-03-20 20:46 ` Junio C Hamano
1 sibling, 0 replies; 4+ messages in thread
From: Eric Sunshine @ 2024-03-20 20:35 UTC (permalink / raw
To: Sanchit Jindal via GitGitGadget; +Cc: git, Sanchit Jindal
On Wed, Mar 20, 2024 at 3:48 PM Sanchit Jindal via GitGitGadget
<gitgitgadget@gmail.com> wrote:
> From: sanchit1053 <sanchit1053@gmail.com>
>
> Signed-off-by: sanchit1053 <sanchit1053@gmail.com>
Thanks for submitting a microproject. Some comments...
The From: and Signed-off-by: lines should include your full name and
email address, so probably:
From: Sanchit Jindal <sanchit1053@gmail.com>
...
Signed-off-by: Sanchit Jindal <sanchit1053@gmail.com>
Reviewers would like to know why the changes made by the patch are
desirable, so use the space between From: and Signed-off-by: to
explain the rationale for the patch. This particular case doesn't
require much explanation, but you may want to say something about how
the `test_path_*` functions provide useful diagnostics when they fail
whereas `test` does not.
> ---
> t9803-git-p4-shell-metachars.sh: update to use test_path_* functions
>
> I have updated the statements test [!] -[e|f] with the corresponding
> test_path_* functions The statements are at the end of their respective
> texts and can be easily replaced
>
> I am having trouble with the git send-email and my institutes firewall,
> that is why I am trying to use gitgitgadget
This portion after the "---" line is for commentary which doesn't
become part of the official commit message (unlike the portion above
the "---" lines). When you resubmit, you can use this commentary area
to explain what you changed between v1 and v2 (which, in this case,
will just be adding a commit message and fixing the From: and
Signed-off-by: lines). GitGitGadget inserts what you wrote in the PR's
description into this area below the "---" line, so you'll want to
update the PR's description to explain what changed between v1 and v2.
> diff --git a/t/t9803-git-p4-shell-metachars.sh b/t/t9803-git-p4-shell-metachars.sh
> @@ -33,8 +33,8 @@ test_expect_success 'shell metachars in filenames' '
> - test -e "file with spaces" &&
> - test -e "foo\$bar"
> + test_path_exists "file with spaces" &&
> + test_path_exists "foo\$bar"
> @@ -52,8 +52,8 @@ test_expect_success 'deleting with shell metachars' '
> - test ! -e "file with spaces" &&
> - test ! -e foo\$bar
> + test_path_is_missing "file with spaces" &&
> + test_path_is_missing foo\$bar
> @@ -100,8 +100,8 @@ test_expect_success 'branch with shell char' '
> - test -f shell_char_branch_file &&
> - test -f f1
> + test_path_is_file shell_char_branch_file &&
> + test_path_is_file f1
These changes all look trivially correct and faithfully retain the
intention of the original `test` checks. Good.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] t9803-git-p4-shell-metachars.sh: update to use test_path_* functions
2024-03-20 19:48 [PATCH] t9803-git-p4-shell-metachars.sh: update to use test_path_* functions Sanchit Jindal via GitGitGadget
2024-03-20 20:35 ` Eric Sunshine
@ 2024-03-20 20:46 ` Junio C Hamano
2024-03-20 21:06 ` Eric Sunshine
1 sibling, 1 reply; 4+ messages in thread
From: Junio C Hamano @ 2024-03-20 20:46 UTC (permalink / raw
To: Sanchit Jindal via GitGitGadget; +Cc: git, Sanchit Jindal
"Sanchit Jindal via GitGitGadget" <gitgitgadget@gmail.com> writes:
> From: sanchit1053 <sanchit1053@gmail.com>
>
> Signed-off-by: sanchit1053 <sanchit1053@gmail.com>
> ---
> t9803-git-p4-shell-metachars.sh: update to use test_path_* functions
>
> I have updated the statements test [!] -[e|f] with the corresponding
> test_path_* functions The statements are at the end of their respective
> texts and can be easily replaced
>
> I am having trouble with the git send-email and my institutes firewall,
> that is why I am trying to use gitgitgadget
A few minor points.
* As our test numbers uniquely identify test scripts, your commit
title can be "t9803: use test_path_* helpers".
* We prefer to see the patches signed with real name. As you seem
to have let your name known to GGG, I am assuming "sanchit1053"
is not a name you chose for anonymity. You would want to, at
least while you are working for this project, have something like
$ git config user.name "Sanchit Jindal"
in the repository you use to work on Git.
* The proposed commit log message is empty; you seem to have a lot
more after the three-dash lines, which probably came from pull
request message you gave GGG. The single paragraph that talks
about "test [!] -[e|f]" should go between From: and Signed-off-by:
but refer to Documentation/SubmittingPatches:[[describe-changes]]
while reading the message again and updating it.
The patch text below looks good to me (but that is to be
expected---a microproject is not a practice about coding, but is
a practice about interacting with reviewers and going through a
contribution process).
Thanks.
> t/t9803-git-p4-shell-metachars.sh | 12 ++++++------
> 1 file changed, 6 insertions(+), 6 deletions(-)
>
> diff --git a/t/t9803-git-p4-shell-metachars.sh b/t/t9803-git-p4-shell-metachars.sh
> index 2913277013d..4905ed2ae9e 100755
> --- a/t/t9803-git-p4-shell-metachars.sh
> +++ b/t/t9803-git-p4-shell-metachars.sh
> @@ -33,8 +33,8 @@ test_expect_success 'shell metachars in filenames' '
> (
> cd "$cli" &&
> p4 sync ... &&
> - test -e "file with spaces" &&
> - test -e "foo\$bar"
> + test_path_exists "file with spaces" &&
> + test_path_exists "foo\$bar"
> )
> '
>
> @@ -52,8 +52,8 @@ test_expect_success 'deleting with shell metachars' '
> (
> cd "$cli" &&
> p4 sync ... &&
> - test ! -e "file with spaces" &&
> - test ! -e foo\$bar
> + test_path_is_missing "file with spaces" &&
> + test_path_is_missing foo\$bar
> )
> '
>
> @@ -100,8 +100,8 @@ test_expect_success 'branch with shell char' '
> git p4 clone --dest=. --detect-branches //depot@all &&
> git log --all --graph --decorate --stat &&
> git reset --hard p4/depot/branch\$3 &&
> - test -f shell_char_branch_file &&
> - test -f f1
> + test_path_is_file shell_char_branch_file &&
> + test_path_is_file f1
> )
> '
>
>
> base-commit: 3bd955d26919e149552f34aacf8a4e6368c26cec
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] t9803-git-p4-shell-metachars.sh: update to use test_path_* functions
2024-03-20 20:46 ` Junio C Hamano
@ 2024-03-20 21:06 ` Eric Sunshine
0 siblings, 0 replies; 4+ messages in thread
From: Eric Sunshine @ 2024-03-20 21:06 UTC (permalink / raw
To: Junio C Hamano; +Cc: Sanchit Jindal via GitGitGadget, git, Sanchit Jindal
On Wed, Mar 20, 2024 at 4:46 PM Junio C Hamano <gitster@pobox.com> wrote:
> A few minor points.
>
> * As our test numbers uniquely identify test scripts, your commit
> title can be "t9803: use test_path_* helpers".
I meant to mention this, as well, in my review but forgot.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2024-03-20 21:06 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-03-20 19:48 [PATCH] t9803-git-p4-shell-metachars.sh: update to use test_path_* functions Sanchit Jindal via GitGitGadget
2024-03-20 20:35 ` Eric Sunshine
2024-03-20 20:46 ` Junio C Hamano
2024-03-20 21:06 ` Eric Sunshine
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.