-
Notifications
You must be signed in to change notification settings - Fork 130
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
t9803-git-p4-shell-metachars.sh: update to use test_path_* functions #1700
t9803-git-p4-shell-metachars.sh: update to use test_path_* functions #1700
Conversation
Signed-off-by: sanchit1053 <sanchit1053@gmail.com>
Welcome to GitGitGadgetHi @sanchit1053, and welcome to GitGitGadget, the GitHub App to send patch series to the Git mailing list from GitHub Pull Requests. Please make sure that either:
You can CC potential reviewers by adding a footer to the PR description with the following syntax:
Also, it is a good idea to review the commit messages one last time, as the Git project expects them in a quite specific form:
It is in general a good idea to await the automated test ("Checks") in this Pull Request before contributing the patches, e.g. to avoid trivial issues such as unportable code. Contributing the patchesBefore you can contribute the patches, your GitHub username needs to be added to the list of permitted users. Any already-permitted user can do that, by adding a comment to your PR of the form Both the person who commented An alternative is the channel
Once on the list of permitted usernames, you can contribute the patches to the Git mailing list by adding a PR comment If you want to see what email(s) would be sent for a After you submit, GitGitGadget will respond with another comment that contains the link to the cover letter mail in the Git mailing list archive. Please make sure to monitor the discussion in that thread and to address comments and suggestions (while the comments and suggestions will be mirrored into the PR by GitGitGadget, you will still want to reply via mail). If you do not want to subscribe to the Git mailing list just to be able to respond to a mail, you can download the mbox from the Git mailing list archive (click the curl -g --user "<EMailAddress>:<Password>" \
--url "imaps://imap.gmail.com/INBOX" -T /path/to/raw.txt To iterate on your change, i.e. send a revised patch or patch series, you will first want to (force-)push to the same branch. You probably also want to modify your Pull Request description (or title). It is a good idea to summarize the revision by adding something like this to the cover letter (read: by editing the first comment on the PR, i.e. the PR description):
To send a new iteration, just add another PR comment with the contents: Need help?New contributors who want advice are encouraged to join git-mentoring@googlegroups.com, where volunteers who regularly contribute to Git are willing to answer newbie questions, give advice, or otherwise provide mentoring to interested contributors. You must join in order to post or view messages, but anyone can join. You may also be able to find help in real time in the developer IRC channel, |
/allow |
User sanchit1053 is now allowed to use GitGitGadget. WARNING: sanchit1053 has no public email address set on GitHub; |
/submit |
Error: Could not determine full name of sanchit1053 |
/submit |
Submitted as pull.1700.git.1710964109659.gitgitgadget@gmail.com To fetch this version into
To fetch this version to local tag
|
On the Git mailing list, Eric Sunshine wrote (reply to this): 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. |
User |
On the Git mailing list, Junio C Hamano wrote (reply to this): "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 |
On the Git mailing list, Eric Sunshine wrote (reply to this): 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. |
I have updated the statements
test [!] -[e|f]
with the correspondingtest_path_*
functionsThe 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
cc: Eric Sunshine sunshine@sunshineco.com