Skip to content
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 #1691

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

sanchit1053
Copy link

@sanchit1053 sanchit1053 commented Mar 20, 2024

Correct Typo in Branch name

cc: Eric Sunshine [email protected]

Copy link

There are issues in commit 1eeb082:
t9803: Update commit messages and description
Prefixed commit message must be in lower case
Commit not signed off

1 similar comment
Copy link

There are issues in commit 1eeb082:
t9803: Update commit messages and description
Prefixed commit message must be in lower case
Commit not signed off

Copy link

There are issues in commit 38caf97:
t9803: Update commit messages and description
Prefixed commit message must be in lower case

Copy link

There are issues in commit 1eeb082:
t9803: Update commit messages and description
Prefixed commit message must be in lower case
Commit not signed off

Copy link

There are issues in commit 38caf97:
t9803: Update commit messages and description
Prefixed commit message must be in lower case

@sanchit1053
Copy link
Author

sanchit1053 commented Mar 21, 2024

/submit

Copy link

Submitted as [email protected]

To fetch this version into FETCH_HEAD:

git fetch https://github.com/gitgitgadget/git/ pr-git-1691/sanchit1053/sj/t9803_use_path_helper_fn-v1

To fetch this version to local tag pr-git-1691/sanchit1053/sj/t9803_use_path_helper_fn-v1:

git fetch --no-tags https://github.com/gitgitgadget/git/ tag pr-git-1691/sanchit1053/sj/t9803_use_path_helper_fn-v1

Copy link

On the Git mailing list, Eric Sunshine wrote (reply to this), regarding b8d0620:

On Thu, Mar 21, 2024 at 3:39 PM Sanchit Jindal via GitGitGadget
<[email protected]> wrote:
> From: Sanchit Jindal <[email protected]>
>
> replacing `test -e` with test_path_exists,
>           `test ! -e` with test_path_is_missing
>           `test -f` with test_path_is_file
> These helper functions will run the `test` command with the
> corresponding flags and will echo a message if the assert fails.
> This will provide better debugging logs for test, instead of the
> previous method which provided no message
>
> Signed-off-by: Sanchit Jindal <[email protected]>

When rerolling a series to address reviewer comments, you will want
the fixes applied directly to the patches about which the reviewers
commented. The way to do this is to use `git rebase -i` to adjust the
patches as needed. In the case of this simple series, you just want to
"squash" patches [1/2] and [2/2] into a single patch using the `git
rebase -i` "squash" command, and adjust the commit message of the
squashed patch appropriately. Finally, to resubmit it via
GitGitGadget, force-push the revised series to GitGitGadget (using
`git push --force <whatever> <whatever>`), and tell GitGitGadget to
"/submit".

Regarding the commit message, first explain the problem the patch is
solving, and then explain how the patch solves it. Thus, start by
explaining that `test` doesn't provide any diagnostic information when
it fails, which isn't helpful to test authors. Then explain that the
patch replaces `test` with the test_path_* functions which do provide
useful diagnostic information.

The From: and Signed-off-by: lines look good in this reroll.

Copy link

User Eric Sunshine <[email protected]> has been added to the cc: list.

Copy link

There are issues in commit 58f07ff:
t9803: update commit messages and description
Lines in the body of the commit messages should be wrapped between 60 and 76 characters.
Indented lines, and lines without whitespace, are exempt

Using the `test` function directly does not provide any
diagnostic information to the user, in case of a failure.

This patch replace the `test` function with the helper functions
defined that will call the corresponding test function and log an
error message if the assert fails

Making the replacements
- `test -e` -> test_path_exists,
- `test ! -e` -> test_path_is_missing
- `test -f` -> test_path_is_file

Signed-off-by: Sanchit Jindal <[email protected]>
@sanchit1053
Copy link
Author

/submit

Copy link

Submitted as [email protected]

To fetch this version into FETCH_HEAD:

git fetch https://github.com/gitgitgadget/git/ pr-git-1691/sanchit1053/sj/t9803_use_path_helper_fn-v2

To fetch this version to local tag pr-git-1691/sanchit1053/sj/t9803_use_path_helper_fn-v2:

git fetch --no-tags https://github.com/gitgitgadget/git/ tag pr-git-1691/sanchit1053/sj/t9803_use_path_helper_fn-v2

Copy link

On the Git mailing list, Sanchit Jindal wrote (reply to this), regarding b8d0620 (outdated):

On Fri, 22 Mar 2024 at 01:22, Eric Sunshine <[email protected]> wrote:
>
> On Thu, Mar 21, 2024 at 3:39 PM Sanchit Jindal via GitGitGadget
> <[email protected]> wrote:
> > From: Sanchit Jindal <[email protected]>
> >
> > replacing `test -e` with test_path_exists,
> >           `test ! -e` with test_path_is_missing
> >           `test -f` with test_path_is_file
> > These helper functions will run the `test` command with the
> > corresponding flags and will echo a message if the assert fails.
> > This will provide better debugging logs for test, instead of the
> > previous method which provided no message
> >
> > Signed-off-by: Sanchit Jindal <[email protected]>
>
> When rerolling a series to address reviewer comments, you will want
> the fixes applied directly to the patches about which the reviewers
> commented. The way to do this is to use `git rebase -i` to adjust the
> patches as needed. In the case of this simple series, you just want to
> "squash" patches [1/2] and [2/2] into a single patch using the `git
> rebase -i` "squash" command, and adjust the commit message of the
> squashed patch appropriately. Finally, to resubmit it via
> GitGitGadget, force-push the revised series to GitGitGadget (using
> `git push --force <whatever> <whatever>`), and tell GitGitGadget to
> "/submit".
>
> Regarding the commit message, first explain the problem the patch is
> solving, and then explain how the patch solves it. Thus, start by
> explaining that `test` doesn't provide any diagnostic information when
> it fails, which isn't helpful to test authors. Then explain that the
> patch replaces `test` with the test_path_* functions which do provide
> useful diagnostic information.
>
> The From: and Signed-off-by: lines look good in this reroll.

Thank You for the review

I renamed the branch using github as it had a typo which made the
earlier patch to be erased.I am extremely sorry about this.

I have created another patch with a more descriptive commit message,
and after squashing it with the earlier commit. I hope it is satisfactory

I wanted to ask, Is it possible to send the patches created using
`git format-patch` manually using gmail, Or the default headers
applied by `send-email` required.

Regards,
Sanchit Jindal

Copy link

On the Git mailing list, Junio C Hamano wrote (reply to this), regarding b8d0620 (outdated):

Sanchit Jindal <[email protected]> writes:

> I have created another patch with a more descriptive commit message,
> and after squashing it with the earlier commit. I hope it is satisfactory

Hopefully.  What GGG sent with v2 label still was a 2-patch series,
whose [2/2] patch was an empty patch, though.

> I wanted to ask, Is it possible to send the patches created using
> `git format-patch` manually using gmail, Or the default headers
> applied by `send-email` required.

I do not know where you are using gmail from (I know that Android
version has no way to send text-only e-mail for example), but when
cutting and pasting the output from format-patch, you should make
sure

 * Remove "From <commit object name> Mon Sep 17 00:00:00 2001"
   marker line that signals the beginning of each patch message.  It
   is a mistake to leave this line in the body of your message.

 * Remove "Date: " header.  Do not leave this line in the body of
   your message.

 * Remove "Subject: " header and move its contents to your MUA's
   Subject entry field.

 * Remove "From: " header, and arrange that your MUA puts the same
   "Sanchit Jindal <[email protected]> on the From header.  If
   your MUA is not cooperating, you can leave that line in the body
   of the message

 * Your cut&paste does not corrupt whitespaces, like squashing two
   consecutive spaces into one, removing the leading whitespaces,
   turning a tab into a run of spaces, folding a line at a
   whitespace in the middle of the message, etc.

 * Your MUA does not turn your text message into HTML gunk.

As long as you do the above carefully, you should be OK.  "git
format-patch --help" has a section on MUA specific hints, which also
might be helpful.

Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant