git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] t9803-git-p4-shell-metachars.sh: update to use test_path_* functions

From
Eric Sunshine <sunshine@sunshineco.com>
Date
Mar 20, 2024, 20:35 UTC
Message-ID
<CAPig+cTPgh=Yf7x9FHNgDbNDViMCJg9aqg9F_C=OO1BB_=AErw@mail.gmail.com>
In-Reply-To
<pull.1700.git.1710964109659.gitgitgadget@gmail.com>

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.

Show 9 quoted lines
> ---
>     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.
Show 16 quoted lines
> 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.

Previous: Sanchit Jindal via GitGitGadgetNext: Junio C Hamano
Message 2 of 4 in “t9803-git-p4-shell-metachars.sh: update to use test_path_* functions”
  1. t9803-git-p4-shell-metachars.sh: update to use test_path_* functionsSanchit Jindal via GitGitGadget, Mar 20, 2024
  2. Eric SunshineMar 20, 2024
  3. Junio C HamanoMar 20, 2024
  4. Eric SunshineMar 20, 2024

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.