{"thread":{"id":"61173","subject":"[PATCH 0/2] t9803-git-p4-shell-metachars.sh: update to use test_path_* functions","startedAt":"2024-03-21T19:39:26Z","lastAt":"2024-03-21T23:25:41Z","messageCount":9,"participants":["Sanchit Jindal via GitGitGadget","sanchit1053 via GitGitGadget","Eric Sunshine","Sanchit Jindal","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":2},"messages":[{"id":"491166","messageId":"pull.1691.git.git.1711049963.gitgitgadget@gmail.com","threadId":"61173","inReplyTo":null,"subject":"[PATCH 0/2] t9803-git-p4-shell-metachars.sh: update to use test_path_* functions","fromName":"Sanchit Jindal via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2024-03-21T19:39:21Z","receivedAt":"2024-03-21T19:39:26Z","isPatch":true,"sender":{"key":"sanchit1053@gmail.com","avatar":null},"body":"Correct Typo in Branch name\n\nSanchit Jindal (1):\n  t9803: update commit messages and description\n\nsanchit1053 (1):\n  t9803-git-p4-shell-metachars.sh: update to use test_path_* functions\n\n t/t9803-git-p4-shell-metachars.sh | 12 ++++++------\n 1 file changed, 6 insertions(+), 6 deletions(-)\n\n\nbase-commit: 3bd955d26919e149552f34aacf8a4e6368c26cec\nPublished-As: https://github.com/gitgitgadget/git/releases/tag/pr-git-1691%2Fsanchit1053%2Fsj%2Ft9803_use_path_helper_fn-v1\nFetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-git-1691/sanchit1053/sj/t9803_use_path_helper_fn-v1\nPull-Request: https://github.com/git/git/pull/1691\n-- \ngitgitgadget\n"},{"id":"491167","messageId":"b541ce7a49cedee5a3044af8b52bf1d155496211.1711049963.git.gitgitgadget@gmail.com","threadId":"61173","inReplyTo":"pull.1691.git.git.1711049963.gitgitgadget@gmail.com","subject":"[PATCH 1/2] t9803-git-p4-shell-metachars.sh: update to use test_path_* functions","fromName":"sanchit1053 via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2024-03-21T19:39:22Z","receivedAt":"2024-03-21T19:39:27Z","isPatch":true,"sender":{"key":"name:sanchit1053","avatar":null},"body":"From: sanchit1053 <sanchit1053@gmail.com>\n\nSigned-off-by: sanchit1053 <sanchit1053@gmail.com>\n---\n t/t9803-git-p4-shell-metachars.sh | 12 ++++++------\n 1 file changed, 6 insertions(+), 6 deletions(-)\n\ndiff --git a/t/t9803-git-p4-shell-metachars.sh b/t/t9803-git-p4-shell-metachars.sh\nindex 2913277013d..4905ed2ae9e 100755\n--- a/t/t9803-git-p4-shell-metachars.sh\n+++ b/t/t9803-git-p4-shell-metachars.sh\n@@ -33,8 +33,8 @@ test_expect_success 'shell metachars in filenames' '\n \t(\n \t\tcd \"$cli\" &&\n \t\tp4 sync ... &&\n-\t\ttest -e \"file with spaces\" &&\n-\t\ttest -e \"foo\\$bar\"\n+\t\ttest_path_exists \"file with spaces\" &&\n+\t\ttest_path_exists \"foo\\$bar\"\n \t)\n '\n \n@@ -52,8 +52,8 @@ test_expect_success 'deleting with shell metachars' '\n \t(\n \t\tcd \"$cli\" &&\n \t\tp4 sync ... &&\n-\t\ttest ! -e \"file with spaces\" &&\n-\t\ttest ! -e foo\\$bar\n+\t\ttest_path_is_missing \"file with spaces\" &&\n+\t\ttest_path_is_missing foo\\$bar\n \t)\n '\n \n@@ -100,8 +100,8 @@ test_expect_success 'branch with shell char' '\n \t\tgit p4 clone --dest=. --detect-branches //depot@all &&\n \t\tgit log --all --graph --decorate --stat &&\n \t\tgit reset --hard p4/depot/branch\\$3 &&\n-\t\ttest -f shell_char_branch_file &&\n-\t\ttest -f f1\n+\t\ttest_path_is_file shell_char_branch_file &&\n+\t\ttest_path_is_file f1\n \t)\n '\n \n-- \ngitgitgadget\n\n"},{"id":"491168","messageId":"b8d0620d4104106210ecf6a34ada591adf01cff8.1711049963.git.gitgitgadget@gmail.com","threadId":"61173","inReplyTo":"pull.1691.git.git.1711049963.gitgitgadget@gmail.com","subject":"[PATCH 2/2] t9803: update commit messages and description","fromName":"Sanchit Jindal via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2024-03-21T19:39:23Z","receivedAt":"2024-03-21T19:39:28Z","isPatch":true,"sender":{"key":"sanchit1053@gmail.com","avatar":null},"body":"From: Sanchit Jindal <sanchit1053@gmail.com>\n\nreplacing `test -e` with test_path_exists,\n\t  `test ! -e` with test_path_is_missing\n\t  `test -f` with test_path_is_file\nThese helper functions will run the `test` command with the\ncorresponding flags and will echo a message if the assert fails.\nThis will provide better debugging logs for test, instead of the\nprevious method which provided no message\n\nSigned-off-by: Sanchit Jindal <sanchit1053@gmail.com>\n-- \ngitgitgadget\n"},{"id":"491171","messageId":"CAPig+cRweMree1LJ=qpOJZg7HYvgE9XX8iFvMKcAGYJpAFGFDg@mail.gmail.com","threadId":"61173","inReplyTo":"b8d0620d4104106210ecf6a34ada591adf01cff8.1711049963.git.gitgitgadget@gmail.com","subject":"Re: [PATCH 2/2] t9803: update commit messages and description","fromName":"Eric Sunshine","fromEmail":"sunshine@sunshineco.com","sentAt":"2024-03-21T19:52:14Z","receivedAt":"2024-03-21T19:52:26Z","isPatch":true,"sender":{"key":"sunshine@sunshineco.com","avatar":"https://avatars.githubusercontent.com/u/163641?v=4"},"body":"On Thu, Mar 21, 2024 at 3:39 PM Sanchit Jindal via GitGitGadget\n<gitgitgadget@gmail.com> wrote:\n> From: Sanchit Jindal <sanchit1053@gmail.com>\n>\n> replacing `test -e` with test_path_exists,\n>           `test ! -e` with test_path_is_missing\n>           `test -f` with test_path_is_file\n> These helper functions will run the `test` command with the\n> corresponding flags and will echo a message if the assert fails.\n> This will provide better debugging logs for test, instead of the\n> previous method which provided no message\n>\n> Signed-off-by: Sanchit Jindal <sanchit1053@gmail.com>\n\nWhen rerolling a series to address reviewer comments, you will want\nthe fixes applied directly to the patches about which the reviewers\ncommented. The way to do this is to use `git rebase -i` to adjust the\npatches as needed. In the case of this simple series, you just want to\n\"squash\" patches [1/2] and [2/2] into a single patch using the `git\nrebase -i` \"squash\" command, and adjust the commit message of the\nsquashed patch appropriately. Finally, to resubmit it via\nGitGitGadget, force-push the revised series to GitGitGadget (using\n`git push --force <whatever> <whatever>`), and tell GitGitGadget to\n\"/submit\".\n\nRegarding the commit message, first explain the problem the patch is\nsolving, and then explain how the patch solves it. Thus, start by\nexplaining that `test` doesn't provide any diagnostic information when\nit fails, which isn't helpful to test authors. Then explain that the\npatch replaces `test` with the test_path_* functions which do provide\nuseful diagnostic information.\n\nThe From: and Signed-off-by: lines look good in this reroll.\n"},{"id":"491173","messageId":"CAN7Jk_3A5c=5E+CNyncaT9qe_d85_p6ZHNzJPd0E5ZSjG1kQng@mail.gmail.com","threadId":"61173","inReplyTo":"CAPig+cRweMree1LJ=qpOJZg7HYvgE9XX8iFvMKcAGYJpAFGFDg@mail.gmail.com","subject":"Re: [PATCH 2/2] t9803: update commit messages and description","fromName":"Sanchit Jindal","fromEmail":"sanchit1053@gmail.com","sentAt":"2024-03-21T20:28:21Z","receivedAt":"2024-03-21T20:28:33Z","isPatch":true,"sender":{"key":"sanchit1053@gmail.com","avatar":null},"body":"On Fri, 22 Mar 2024 at 01:22, Eric Sunshine <sunshine@sunshineco.com> wrote:\n>\n> On Thu, Mar 21, 2024 at 3:39 PM Sanchit Jindal via GitGitGadget\n> <gitgitgadget@gmail.com> wrote:\n> > From: Sanchit Jindal <sanchit1053@gmail.com>\n> >\n> > replacing `test -e` with test_path_exists,\n> >           `test ! -e` with test_path_is_missing\n> >           `test -f` with test_path_is_file\n> > These helper functions will run the `test` command with the\n> > corresponding flags and will echo a message if the assert fails.\n> > This will provide better debugging logs for test, instead of the\n> > previous method which provided no message\n> >\n> > Signed-off-by: Sanchit Jindal <sanchit1053@gmail.com>\n>\n> When rerolling a series to address reviewer comments, you will want\n> the fixes applied directly to the patches about which the reviewers\n> commented. The way to do this is to use `git rebase -i` to adjust the\n> patches as needed. In the case of this simple series, you just want to\n> \"squash\" patches [1/2] and [2/2] into a single patch using the `git\n> rebase -i` \"squash\" command, and adjust the commit message of the\n> squashed patch appropriately. Finally, to resubmit it via\n> GitGitGadget, force-push the revised series to GitGitGadget (using\n> `git push --force <whatever> <whatever>`), and tell GitGitGadget to\n> \"/submit\".\n>\n> Regarding the commit message, first explain the problem the patch is\n> solving, and then explain how the patch solves it. Thus, start by\n> explaining that `test` doesn't provide any diagnostic information when\n> it fails, which isn't helpful to test authors. Then explain that the\n> patch replaces `test` with the test_path_* functions which do provide\n> useful diagnostic information.\n>\n> The From: and Signed-off-by: lines look good in this reroll.\n\nThank You for the review\n\nI renamed the branch using github as it had a typo which made the\nearlier patch to be erased.I am extremely sorry about this.\n\nI have created another patch with a more descriptive commit message,\nand after squashing it with the earlier commit. I hope it is satisfactory\n\nI wanted to ask, Is it possible to send the patches created using\n`git format-patch` manually using gmail, Or the default headers\napplied by `send-email` required.\n\nRegards,\nSanchit Jindal\n"},{"id":"491174","messageId":"pull.1691.v2.git.git.1711052946.gitgitgadget@gmail.com","threadId":"61173","inReplyTo":"pull.1691.git.git.1711049963.gitgitgadget@gmail.com","subject":"[PATCH v2 0/2] t9803-git-p4-shell-metachars.sh: update to use test_path_* functions","fromName":"Sanchit Jindal via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2024-03-21T20:29:04Z","receivedAt":"2024-03-21T20:29:10Z","isPatch":true,"sender":{"key":"sanchit1053@gmail.com","avatar":null},"body":"Correct Typo in Branch name\n\nSanchit Jindal (1):\n  t9803: update commit messages and description\n\nsanchit1053 (1):\n  t9803-git-p4-shell-metachars.sh: update to use test_path_* functions\n\n t/t9803-git-p4-shell-metachars.sh | 12 ++++++------\n 1 file changed, 6 insertions(+), 6 deletions(-)\n\n\nbase-commit: 3bd955d26919e149552f34aacf8a4e6368c26cec\nPublished-As: https://github.com/gitgitgadget/git/releases/tag/pr-git-1691%2Fsanchit1053%2Fsj%2Ft9803_use_path_helper_fn-v2\nFetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-git-1691/sanchit1053/sj/t9803_use_path_helper_fn-v2\nPull-Request: https://github.com/git/git/pull/1691\n\nRange-diff vs v1:\n\n 1:  b541ce7a49c = 1:  b541ce7a49c t9803-git-p4-shell-metachars.sh: update to use test_path_* functions\n 2:  b8d0620d410 < -:  ----------- t9803: update commit messages and description\n -:  ----------- > 2:  e25b5f928a9 t9803: update commit messages and description\n\n-- \ngitgitgadget\n"},{"id":"491175","messageId":"b541ce7a49cedee5a3044af8b52bf1d155496211.1711052946.git.gitgitgadget@gmail.com","threadId":"61173","inReplyTo":"pull.1691.v2.git.git.1711052946.gitgitgadget@gmail.com","subject":"[PATCH v2 1/2] t9803-git-p4-shell-metachars.sh: update to use test_path_* functions","fromName":"sanchit1053 via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2024-03-21T20:29:05Z","receivedAt":"2024-03-21T20:29:11Z","isPatch":true,"sender":{"key":"name:sanchit1053","avatar":null},"body":"From: sanchit1053 <sanchit1053@gmail.com>\n\nSigned-off-by: sanchit1053 <sanchit1053@gmail.com>\n---\n t/t9803-git-p4-shell-metachars.sh | 12 ++++++------\n 1 file changed, 6 insertions(+), 6 deletions(-)\n\ndiff --git a/t/t9803-git-p4-shell-metachars.sh b/t/t9803-git-p4-shell-metachars.sh\nindex 2913277013d..4905ed2ae9e 100755\n--- a/t/t9803-git-p4-shell-metachars.sh\n+++ b/t/t9803-git-p4-shell-metachars.sh\n@@ -33,8 +33,8 @@ test_expect_success 'shell metachars in filenames' '\n \t(\n \t\tcd \"$cli\" &&\n \t\tp4 sync ... &&\n-\t\ttest -e \"file with spaces\" &&\n-\t\ttest -e \"foo\\$bar\"\n+\t\ttest_path_exists \"file with spaces\" &&\n+\t\ttest_path_exists \"foo\\$bar\"\n \t)\n '\n \n@@ -52,8 +52,8 @@ test_expect_success 'deleting with shell metachars' '\n \t(\n \t\tcd \"$cli\" &&\n \t\tp4 sync ... &&\n-\t\ttest ! -e \"file with spaces\" &&\n-\t\ttest ! -e foo\\$bar\n+\t\ttest_path_is_missing \"file with spaces\" &&\n+\t\ttest_path_is_missing foo\\$bar\n \t)\n '\n \n@@ -100,8 +100,8 @@ test_expect_success 'branch with shell char' '\n \t\tgit p4 clone --dest=. --detect-branches //depot@all &&\n \t\tgit log --all --graph --decorate --stat &&\n \t\tgit reset --hard p4/depot/branch\\$3 &&\n-\t\ttest -f shell_char_branch_file &&\n-\t\ttest -f f1\n+\t\ttest_path_is_file shell_char_branch_file &&\n+\t\ttest_path_is_file f1\n \t)\n '\n \n-- \ngitgitgadget\n\n"},{"id":"491176","messageId":"e25b5f928a9427de57ff1963d9fb4bca2b86e829.1711052946.git.gitgitgadget@gmail.com","threadId":"61173","inReplyTo":"pull.1691.v2.git.git.1711052946.gitgitgadget@gmail.com","subject":"[PATCH v2 2/2] t9803: update commit messages and description","fromName":"Sanchit Jindal via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2024-03-21T20:29:06Z","receivedAt":"2024-03-21T20:29:12Z","isPatch":true,"sender":{"key":"sanchit1053@gmail.com","avatar":null},"body":"From: Sanchit Jindal <sanchit1053@gmail.com>\n\nUsing the `test` function directly does not provide any\ndiagnostic information to the user, in case of a failure.\n\nThis patch replace the `test` function with the helper functions\ndefined that will call the corresponding test function and log an\nerror message if the assert fails\n\nMaking the replacements\n- `test -e` -> test_path_exists,\n- `test ! -e` -> test_path_is_missing\n- `test -f` -> test_path_is_file\n\nSigned-off-by: Sanchit Jindal <sanchit1053@gmail.com>\n-- \ngitgitgadget\n"},{"id":"491187","messageId":"xmqqsf0j5frm.fsf@gitster.g","threadId":"61173","inReplyTo":"CAN7Jk_3A5c=5E+CNyncaT9qe_d85_p6ZHNzJPd0E5ZSjG1kQng@mail.gmail.com","subject":"Re: [PATCH 2/2] t9803: update commit messages and description","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2024-03-21T23:25:33Z","receivedAt":"2024-03-21T23:25:41Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Sanchit Jindal <sanchit1053@gmail.com> writes:\n\n> I have created another patch with a more descriptive commit message,\n> and after squashing it with the earlier commit. I hope it is satisfactory\n\nHopefully.  What GGG sent with v2 label still was a 2-patch series,\nwhose [2/2] patch was an empty patch, though.\n\n> I wanted to ask, Is it possible to send the patches created using\n> `git format-patch` manually using gmail, Or the default headers\n> applied by `send-email` required.\n\nI do not know where you are using gmail from (I know that Android\nversion has no way to send text-only e-mail for example), but when\ncutting and pasting the output from format-patch, you should make\nsure\n\n * Remove \"From <commit object name> Mon Sep 17 00:00:00 2001\"\n   marker line that signals the beginning of each patch message.  It\n   is a mistake to leave this line in the body of your message.\n\n * Remove \"Date: \" header.  Do not leave this line in the body of\n   your message.\n\n * Remove \"Subject: \" header and move its contents to your MUA's\n   Subject entry field.\n\n * Remove \"From: \" header, and arrange that your MUA puts the same\n   \"Sanchit Jindal <sanchit1053@gmail.com> on the From header.  If\n   your MUA is not cooperating, you can leave that line in the body\n   of the message\n\n * Your cut&paste does not corrupt whitespaces, like squashing two\n   consecutive spaces into one, removing the leading whitespaces,\n   turning a tab into a run of spaces, folding a line at a\n   whitespace in the middle of the message, etc.\n\n * Your MUA does not turn your text message into HTML gunk.\n\nAs long as you do the above carefully, you should be OK.  \"git\nformat-patch --help\" has a section on MUA specific hints, which also\nmight be helpful.\n\nThanks.\n"}]}