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

Re: [PATCH 2/2] [Outreachy][Patch v2] t3404: avoid losing exit status to pipes

From
Usman Akinyemi <usmanakinyemi202@gmail.com>
Date
Oct 6, 2024, 06:30 UTC
Message-ID
<CAPSxiM_RKpp2_Y7HqhhFJqnavKpToViAjE3s6AiwCwUjGa8H4g@mail.gmail.com>
In-Reply-To
<CAPig+cTb4mgpXnN79UrXvjvCnqGZhaR51oZX_Ds=HwdqQYFN9w@mail.gmail.com>
On Sun, Oct 6, 2024 at 5:48 AM Eric Sunshine <sunshine@sunshineco.com> wrote:
Show 53 quoted lines
>
> On Sun, Oct 6, 2024 at 1:33 AM Usman Akinyemi via GitGitGadget
> <gitgitgadget@gmail.com> wrote:
> > Changes since v1:
> > - Added "tr -d '[:space:]'" to handle whitespace on macOS
> >
> > Signed-off-by: Usman Akinyemi <usmanakinyemi202@gmail.com>
> > ---
>
> Thanks for the submission. A few comments...
>
> This second patch fixes problems with the first patch, but since this
> is an entirely new submission, you should instead "squash" these two
> patches together and then force-push them to the same branch that you
> used when submitting them via GitGitGadget, and re-submit them as a
> single patch. When you squash them, keep the commit message from the
> first patch.
>
> Reviewers do appreciate that you explained what changed since the
> previous version, but we'd like to see that information as commentary
> in the patch cover letter, not as the commit message of the patch
> itself. In GitGitGadget, the way you would do so is to write this as
> the "Description" of the pull-request (possibly replacing or amending
> the previous description).
>
> Some more observations below...
>
> > diff --git a/t/t3404-rebase-interactive.sh b/t/t3404-rebase-interactive.sh
> > @@ -401,7 +401,7 @@ test_expect_success 'multi-squash only fires up editor once' '
> >         git show >output &&
> > -       count=$(grep ONCE output | wc -l) &&
> > +       count=$(grep ONCE output | wc -l | tr -d '[:space:]') &&
> >         test 1 = "$count"
> >  '
>
> The reason this was failing for you was because you quoted $count. Had
> you instead written:
>
>     test 1 = $count
>
> when it would have worked as expected. In other words, you don't need `tr`.
>
> These days, instead of manually using `wc -l` and `test`, we would
> instead write:
>
>     grep ONCE output >actual &&
>     test_line_count 1 actual
>
> However, that sort of change is independent of the purpose of this
> patch, so you probably should not make such a change in this patch. If
> you're up to it, you could instead turn this into a two-patch series
> in which patch [1/2] fixes the "Git upstream of a pipe" problem, and
> then patch [2/2] converts these cases to use test_line_count().

Hi Eric Sunshine, thanks for the review. I really appreciate it. I have a couple of doubts to clear.

My next patch should be the squash of my three patches which include my first two patches and the new one on the same branch ? Two patch series means two different commits on different patches ? But, since they both depend on each other would not they lead to merge conflict ? Also, to be clear, "Description" is the body of the commit message if I use the gitgitgadget while the "commit message" is the header ?

Thank you.
Previous: Eric SunshineNext: Eric Sunshine
Message 7 of 63 in “t3404: avoid losing exit status to pipes”
  1. 0/2 [Outreachy][Patch v2] t3404: avoid losing exit status to pipesUsman Akinyemi via GitGitGadget, Oct 6, 2024
  2. 1/2 [Outreachy][Patch v1] t3404: avoid losing exit status to pipesUsman Akinyemi via GitGitGadget, Oct 6, 2024
  3. Eric SunshineOct 6, 2024
  4. Usman AkinyemiOct 6, 2024
  5. 2/2 [Outreachy][Patch v2] t3404: avoid losing exit status to pipesUsman Akinyemi via GitGitGadget, Oct 6, 2024
  6. Eric SunshineOct 6, 2024
  7. Usman AkinyemiOct 6, 2024
  8. Eric SunshineOct 6, 2024
  9. Usman AkinyemiOct 6, 2024
  10. [Outreachy][Patch v1] t3404: avoid losing exit status to pipesUsman Akinyemi via GitGitGadget, Oct 6, 2024
  11. Eric SunshineOct 6, 2024
  12. Usman AkinyemiOct 6, 2024
  13. Eric SunshineOct 6, 2024
  14. shejialuoOct 6, 2024
  15. Eric SunshineOct 6, 2024
  16. Usman AkinyemiOct 6, 2024
  17. shejialuoOct 6, 2024
  18. Usman AkinyemiOct 6, 2024
  19. shejialuoOct 6, 2024
  20. shejialuoOct 6, 2024
  21. Usman AkinyemiOct 6, 2024
  22. Eric SunshineOct 7, 2024
  23. 0/2 [Outreachy][Patch v2] t3404: avoid losing exit status to pipesUsman Akinyemi via GitGitGadget, Oct 6, 2024
  24. 1/2 t3404: avoid losing exit status with focus on `git show` and `git cat-files`Usman Akinyemi via GitGitGadget, Oct 6, 2024
  25. Patrick SteinhardtOct 7, 2024
  26. phillip.wood123@gmail.comOct 7, 2024
  27. Usman AkinyemiOct 7, 2024
  28. 2/2 [Outreachy][Patch v1] t3404: employing test_line_count() to replace testUsman Akinyemi via GitGitGadget, Oct 6, 2024
  29. Kristoffer HaugsbakkOct 6, 2024
  30. Eric SunshineOct 7, 2024
  31. Patrick SteinhardtOct 7, 2024
  32. Usman AkinyemiOct 7, 2024
  33. phillip.wood123@gmail.comOct 7, 2024
  34. Usman AkinyemiOct 6, 2024
  35. Eric SunshineOct 7, 2024
  36. Usman AkinyemiOct 7, 2024
  37. Patrick SteinhardtOct 7, 2024
  38. Eric SunshineOct 7, 2024
  39. Usman AkinyemiOct 7, 2024
  40. Kristoffer HaugsbakkOct 6, 2024
  41. Usman AkinyemiOct 6, 2024
  42. Patrick SteinhardtOct 7, 2024
  43. 0/2 [Outreachy][Patch v2] t3404: avoid losing exit status to pipesUsman Akinyemi via GitGitGadget, Oct 7, 2024
  44. 1/2 t3404: avoid losing exit status with focus on `git show` and `git cat-file`Usman Akinyemi via GitGitGadget, Oct 7, 2024
  45. 2/2 [Outreachy][Patch v1] t3404: employing test_line_count() to replace testUsman Akinyemi via GitGitGadget, Oct 7, 2024
  46. Patrick SteinhardtOct 7, 2024
  47. 0/2 [Outreachy][Patch v2] t3404: avoid losing exit status to pipesUsman Akinyemi via GitGitGadget, Oct 7, 2024
  48. 1/2 t3404: avoid losing exit status with focus on `git show` and `git cat-file`Usman Akinyemi via GitGitGadget, Oct 7, 2024
  49. 2/2 t3404: employing test_line_count() to replace testUsman Akinyemi via GitGitGadget, Oct 7, 2024
  50. Patrick SteinhardtOct 7, 2024
  51. Usman AkinyemiOct 7, 2024
  52. 0/2 [Outreachy][Patch v2] t3404: avoid losing exit status to pipesUsman Akinyemi via GitGitGadget, Oct 7, 2024
  53. 1/2 t3404: avoid losing exit status with focus on `git show` and `git cat-file`Usman Akinyemi via GitGitGadget, Oct 7, 2024
  54. 2/2 t3404: employing test_line_count() to replace testUsman Akinyemi via GitGitGadget, Oct 7, 2024
  55. Phillip WoodOct 7, 2024
  56. Usman AkinyemiOct 7, 2024
  57. Patrick SteinhardtOct 7, 2024
  58. Usman AkinyemiOct 7, 2024
  59. Patrick SteinhardtOct 7, 2024
  60. Usman AkinyemiOct 7, 2024
  61. 0/2 [Outreachy][Patch v2] t3404: avoid losing exit status to pipesUsman Akinyemi via GitGitGadget, Oct 7, 2024
  62. 1/2 t3404: avoid losing exit status with focus on `git show` and `git cat-file`Usman Akinyemi via GitGitGadget, Oct 7, 2024
  63. 2/2 t3404: replace test with test_line_count()Usman Akinyemi via GitGitGadget, Oct 7, 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.