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
[PATCH v3] [OUTREACHY] t7001-mv.sh : Use test_path_is_* functions in test script #1372
Conversation
Welcome to GitGitGadgetHi @fobiasic07, and welcome to GitGitGadget, the GitHub App to send patch series to the Git mailing list from GitHub Pull Requests. Please make sure that your Pull Request has a good description, as it will be used as cover letter. 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, |
Invalid author email in 373cb44: "97498997+fobiasic07@users.noreply.github.com" |
Invalid author email in 034c75d: "97498997+fobiasic07@users.noreply.github.com" |
Invalid author email in 9d305c2: "97498997+fobiasic07@users.noreply.github.com" |
t/t7001-mv.sh
Outdated
git diff-files --quiet -- sub && | ||
git add .gitmodules && | ||
git mv sub mod/sub 2>actual.err && | ||
test_must_be_empty actual.err && | ||
! test -e sub && | ||
test_path_exists sub && |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this should be test_path_is_missing sub
instead, and I suspect that would fix the test failure, too.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you, let me retry but would that be for all of the 'test -e' subs or the '! test -e'?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would only be for ! test -e
, the test -e
alone tests for the existence and the !
inverses the condition.
/allow |
User fobiasic07 is now allowed to use GitGitGadget. WARNING: fobiasic07 has no public email address set on GitHub; |
@fobiasic07 my apologies, I meant to start off with a welcome (and while my feedback may sound as if I want to say that this patch is wrong, that is absolutely not the case, it's just that I often forget to first point out what is good about the diff, which is pretty much everything except for that minor bug). So please let me rectify that: welcome to the Git project, I hope you will have a good time, learn a lot, and make connections to people you like. About this PR: please note that the Git project prefers the patch to be "polished", i.e. instead of adding commits that fix issues, please squash them into the original patch and then force-push. Now I would like to talk about the commit message. The Git project puts an extraordinary emphasis on well-written commit messages, and since this is the first thing reviewers will read, it is a good idea to spend time to make it shine. The first line of the commit message, for example, is typically in the form ": ". See f01f948 as an example. In this instance, I would suggest "t7001: modernize file/directory existence tests". The commit message's body probably wants to provide a motivation for the change (here is some excellent advice what aspects excellent commit messages typically cover), I could imagine that the error messages provided by the I look forward to see you develop your patch! Please do not hesitate to ask if anything is unclear or if you would like more assistance. |
Hello @dscho ,
On Thu, Oct 27, 2022 at 9:38 AM Johannes Schindelin ***@***.***> wrote:
@fobiasic07 my apologies, I meant to start off with a welcome (and while my feedback may sound as if I want to say that this patch is wrong, that is absolutely not the case, it's just that I often forget to first point out what is good about the diff, which is pretty much everything except for that minor bug). So please let me rectify that: welcome to the Git project, I hope you will have a good time, learn a lot, and make connections to people you like.
No worries and Thank you, I needed some guidance concerning the issue
About this PR: please note that the Git project prefers the patch to be "polished", i.e. instead of adding commits that fix issues, please squash them into the original patch and then force-push.
I was not aware,so, after fixing the remaining bugs, I will do so.
Now I would like to talk about the commit message. The Git project puts an extraordinary emphasis on well-written commit messages, and since this is the first thing reviewers will read, it is a good idea to spend time to make it shine. The first line of the commit message, for example, is typically in the form ": ". See f01f948 as an example. In this instance, I would suggest "t7001: modernize file/directory existence tests". The commit message's body probably wants to provide a motivation for the change (here is some excellent advice what aspects excellent commit messages typically cover), I could imagine that the error messages provided by the test_path_* family of functions would be a good reason to modernize the script. Also, could you use your real name in the Signed-off-by: line instead of your GitHub handle?
I will make the edits and corrections and send it in. One question,
once I'm done should I /submit directly?
I look forward to see you develop your patch!
Please do not hesitate to ask if anything is unclear or if you would like more assistance.
Thank you, Deba Obondo.
|
All the best, |
Invalid author email in 373cb44: "97498997+fobiasic07@users.noreply.github.com" |
Invalid author email in 034c75d: "97498997+fobiasic07@users.noreply.github.com" |
Invalid author email in 9d305c2: "97498997+fobiasic07@users.noreply.github.com" |
I'm doing it for my contribution, rather than editing and submitting it directly for me, you could suggest a few solutions. Thank you for the offer though. The patch has also passed the checks, it was a tiny bug. the only problem is squashing the commits before I submit it, for it to be 'polished' as required and recommended by both gitGuidelines and @dscho.
Thanks, Debra Obondo |
Hello @dscho
I'm having a challenge, some of the corrections I made to the code I did directly from the remote repo instead of from local and this is causing an issue with squashing the commits into one using the rebase interactive, do you have any recommendations for what I can do to solve this? Thanks in advance, Debra Obondo. |
Invalid author email in a00b908: "97498997+fobiasic07@users.noreply.github.com" |
Invalid author email in f9d9b5d: "97498997+fobiasic07@users.noreply.github.com" |
Invalid author email in a00b908: "97498997+fobiasic07@users.noreply.github.com" |
Invalid author email in 4880fdd: "97498997+fobiasic07@users.noreply.github.com" |
Invalid author email in a58c76a: "97498997+fobiasic07@users.noreply.github.com" |
Hello @dscho ,
So, I was able to squash 3/5 initial commits, a problem however
occurred when I was trying to squash the already squashed commit with
the remaining two and I ended up squashing previous (not authored by
me) commits with my own commits and when I was trying to 'reset --HARD
HEAD', I ended up doing a 'push --HARD' which closed the pull request
and I need to reset it to my commits before I can open another PR, do
you have any suggestions?
|
I was able to do undo the git reset, using the 'git reflog', so, no worries concerning the matter. I am yet to squash the three commits and submit a properly formatted commit and well corrected test file |
Hi @ttaylorr
Question, according to the MyFirstContribution Documentation, it suggests that my patch should be submitted as just the first version if it is yet to be accepted into the 'next' stage, so, should I just squash my commits after making edits and correction and /submit it as it is or should I do a [PATCH V2] and will that be done using gitgitgadget-git or from my local?
Thanks, |
Hi @fobiasic07. You should squash any changes that you found during review and then submit the updated patch as a v2 in reply to the original one. Thanks! |
@fobiasic07 please note that the Git project does not actually use Pull Requests, but instead all of the communication (including the patch contribution) is happening on the Git mailing list. GitGitGadget makes this a bit more convenient by offering to send the patches, and by mapping replies back to the PR as comments, but it does not send comments back out as mails. Therefore, to reply to Martin and Taylor, please use the advice provided in https://github.com/gitgitgadget/gitgitgadget/wiki/ReplyToThis to reply directly, via mail. |
/preview |
Preview email sent as pull.1372.v2.git.git.1667500484581.gitgitgadget@gmail.com |
/submit |
Submitted as pull.1372.v2.git.git.1667500788132.gitgitgadget@gmail.com To fetch this version into
To fetch this version to local tag
|
On the Git mailing list, Martin Ågren wrote (reply to this): On Thu, 3 Nov 2022 at 19:39, Debra Obondo via GitGitGadget
<gitgitgadget@gmail.com> wrote:
>
> From: Debra Obondo <debraobondo@gmail.com>
>
> Test script to verify the presence/absence of files, paths, directories,
> symlinks and other features in 'git mv' command are using the command
> format:
>
> 'test (-e|f|d|h|...)'
>
> Replace them with helper functions of format:
>
> 'test_path_is_*'
Ok.
> Changes since v1
>
> Replacing idiomatic helper functions
>
> '! test_path_is_*'
>
> with
>
> 'test_path_is_missing'
>
The above "Changes since v1" and what I've quoted here should probably
be dropped. We prefer our patches to look as if they've appeared out of
the blue in perfect shape. :-)
> This uses values of 'test_path_bar' in place of '! test_path_foo' to
> bring in the helpful factor of indicating the failure of tests after the
> mv command has been used, that is, it echoes if the feature/test_path
> exists.
This paragraph is excellent. It describes why you've done the patch this
way. This looks much better than version 1 of the patch!
> Signed-off-by: Debra Obondo <debraobondo@gmail.com>
After removing the lines about changes since v1, this patch is
Reviewed-by: Martin Ågren <martin.agren@gmail.com>
> ---
> [PATCH v2] [OUTREACHY] t7001-mv.sh : Use test_path_is_* functions in
> test script
>
> Changes since v1:
>
> Replacing idiomatic helper functions
>
> '! test_path_is_*'
>
> with
>
> 'test_path_is_missing'
This place after the "---" line is an excellent place for including such
"here's what has changed since v1" comments. Good. They will not appear
in the final commit message.
Thanks for contributing!
Martin |
This patch series was integrated into seen via 2f6ba16. |
Test script to verify the presence/absence of files, paths, directories, symlinks and other features in 'git mv' command are using the command format: 'test (-e|f|d|h|...)' Replace them with helper functions of format: 'test_path_is_*' Replacing idiomatic helper functions: '! test_path_is_*' with 'test_path_is_missing' This uses values of 'test_path_bar' in place of '! test_path_foo' to bring in the helpful factor of indicating the failure of tests after the mv command has been used, that is, it echoes if the feature/test_path exists. Signed-off-by: Debra Obondo <debraobondo@gmail.com>
/submit |
Submitted as pull.1372.v3.git.git.1667574352244.gitgitgadget@gmail.com To fetch this version into
To fetch this version to local tag
|
On the Git mailing list, Taylor Blau wrote (reply to this): Hi Debra,
On Fri, Nov 04, 2022 at 03:05:52PM +0000, Debra Obondo via GitGitGadget wrote:
> t/t7001-mv.sh | 62 +++++++++++++++++++++++++--------------------------
> 1 file changed, 31 insertions(+), 31 deletions(-)
This round looks great. Will queue, thanks.
Thanks,
Taylor |
This patch series was integrated into seen via 0d16194. |
This patch series was integrated into seen via fdbeede. |
This patch series was integrated into seen via 57b5007. |
This patch series was integrated into next via dfc9c80. |
This patch series was integrated into seen via ff40b55. |
This patch series was integrated into seen via 561f394. |
This patch series was integrated into master via 561f394. |
This patch series was integrated into next via 561f394. |
Closed via 561f394. |
Changes since prevous 2 versions:
Replacing idiomatic helper functions
'! test_path_is_*'
with
'test_path_is_missing'
This uses values of 'test_path_bar' in place of '! test_path_foo' to
bring in the helpful factor of indicating the failure of tests after the
mv command has been used, that is, it echoes if the feature/test_path
exists .
Older test scripts use the command 'test -' to verify the presence or absence of features such as files, directories and symbolic links. This however requires slightly complicated uses, such as 'test ! -f '. The helper functions 'test_path_is_' located in t/test-lib-functions.sh have taken into account all scenarios of the 'test -' to reduce errors. This was a microproject to replace them with the helper functions.
Test script to verify the presence/absence of files, paths, directories,symboliclinks and many other features in mv command are using the command format
'test -(e|f|s|h|...).
Replace them with helper functions of format
'test_path_is_*'
Signed-off-by: Debra Obondo debraobondo@gmail.com
cc: Taylor Blau me@ttaylorr.com
cc: Martin Ågren martin.agren@gmail.com