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

Re: [Outreachy][PATCH v4] t6050: avoid pipes with upstream Git commands

From
Chizoba ODINAKA <chizobajames21@gmail.com>
Date
Oct 12, 2024, 06:28 UTC
Message-ID
<CACwP9aoDGN_Oaw3-JyjyaH-jKO5wbFYhkeJrV4gTRr2TcRfE1g@mail.gmail.com>
In-Reply-To
<CAPig+cSRJXoZfXdBmWt8md78t-6c2NBjeR=PK=RaKqLoCjxXMw@mail.gmail.com>
On Sat, 12 Oct 2024 at 06:35, Eric Sunshine <sunshine@sunshineco.com> wrote:
Show 28 quoted lines
>
> On Fri, Oct 11, 2024 at 8:00 PM <chizobajames21@gmail.com> wrote:
> > In pipes, the exit code of a chain of commands is determined by
> > the final command. In order not to miss the exit code of a failed
> > Git command, avoid pipes instead write output of Git commands
> > into a file.
> > For better debugging experience, instances of "grep" were changed
> > to "test_grep". "test_grep" provides more context in case of a
> > failed "grep".
> >
> > Signed-off-by: Chizoba ODINAKA <chizobajames21@gmail.com>
> > ---
> > diff --git a/t/t6050-replace.sh b/t/t6050-replace.sh
> > @@ -344,7 +374,8 @@ test_expect_success 'test --format medium' '
> > -       git replace -l --format medium | sort >actual &&
> > +       git replace -l --format medium >actual &&
> > +       sort actual -o actual &&
> >         test_cmp expected actual
>
> Although `sort -o` is POSIX, it may not be supported by all platforms
> on which Git is built. Moreover, as far as I can tell, `sort -o` is
> not used at all in the Git test suite, so we should be wary of using
> it here. Therefore, rather than introducing a novel use of this
> command, which might possibly break on some platform, instead stick
> with what is known to work without problem:
>
>     git replace -l --format medium >output &&
>     sort output >actual &&
Fixed. Thanks Eric.
Previous: Eric SunshineNext: chizobajames21@gmail.com
Message 14 of 25 in “t6050: avoid pipes in git related commands”
  1. chizobajames21@gmail.comOct 8, 2024
  2. Patrick SteinhardtOct 9, 2024
  3. Chizoba ODINAKAOct 10, 2024
  4. [Outreachy][PATCH v2] t6050: avoid pipes with downstream Git commandschizobajames21@gmail.com, Oct 10, 2024
  5. Phillip WoodOct 10, 2024
  6. Chizoba ODINAKAOct 10, 2024
  7. phillip.wood123@gmail.comOct 11, 2024
  8. [Outreachy][PATCH v3] t6050: avoid pipes with downstream Git commandschizobajames21@gmail.com, Oct 11, 2024
  9. Junio C HamanoOct 11, 2024
  10. Eric SunshineOct 11, 2024
  11. Junio C HamanoOct 11, 2024
  12. [Outreachy][PATCH v4] t6050: avoid pipes with upstream Git commandschizobajames21@gmail.com, Oct 11, 2024
  13. Eric SunshineOct 12, 2024
  14. Chizoba ODINAKAOct 12, 2024
  15. [Outreachy][PATCH v5] t6050: avoid pipes with upstream Git commandschizobajames21@gmail.com, Oct 12, 2024
  16. Phillip WoodOct 14, 2024
  17. Chizoba ODINAKAOct 14, 2024
  18. [Outreachy][PATCH v6] t6050: avoid pipes with upstream Git commandschizobajames21@gmail.com, Oct 14, 2024
  19. Taylor BlauOct 14, 2024
  20. Chizoba ODINAKAOct 15, 2024
  21. [Outreachy][PATCH v7] t6050: avoid pipes with upstream Git commandschizobajames21@gmail.com, Oct 15, 2024
  22. [Outreachy][PATCH v7] t6050: avoid pipes with upstream Git commandschizobajames21@gmail.com, Oct 22, 2024
  23. Chizoba ODINAKAOct 22, 2024
  24. Patrick SteinhardtOct 22, 2024
  25. Taylor BlauOct 22, 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.