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

Re: [PATCH v2] t9832,t2200: avoid using pipes in git commands

From
Amanda Shafack <shafack.likhene@gmail.com>
Date
Oct 18, 2020, 22:04 UTC
Message-ID
<CAGxm6oWAmL8db0ycsQ8QqUGugrh7MU8eOS8O1rt-ASLuwBayug@mail.gmail.com>
In-Reply-To
<xmqqsgab7128.fsf@gitster.c.googlers.com>
On Sun, Oct 18, 2020 at 9:04 PM Junio C Hamano <gitster@pobox.com> wrote:
Show 39 quoted lines
>
> Eric Sunshine <sunshine@sunshineco.com> writes:
>
> > precise, the subject could say:
> >
> >     t2200,t9832: avoid using `git` upstream in a pipe
> >
> > Nit: It's subjective, but it feels a bit more natural to list the test
> > numbers in ascending order rather than descending order, which is why
> > I swapped them around in the example above.
>
> ;-)
>
> >> When a git command is upstream in a pipe, an unexpected failure of
> >> the git command will go unnoticed.
> >>
> >> Write out the output of the git command to a file, so as to actively
> >> catch a failure of the git command.
> >
> > It's easy to see from the patch itself that the output of the Git
> > command is now written to a file, so it's not necessary to say so in
> > the commit message. Therefore, the entire body of the commit message
> > could be written more succinctly, perhaps like this:
> >
> >     Avoid placing `git` upstream in a pipe since doing so throws away
> >     its exit code, thus an unexpected failure may go unnoticed.
>
> Yup.
>
> > The actual patch itself looks fine, and these comments about the
> > commit message are quite minor, thus there probably is no need to
> > re-roll (though feel free to do so if you think the bit of extra
> > polishing of the commit message is worthwhile).
>
> IIUC, the microproject experience aims new contributors to get used
> to the style of communication that happens during review cycles of a
> typical topic, using a trivial dip-the-toes-in-the-water problem as
> an example.  I'd rather not to see contributors get into the habit
> of leaving loose ends and have somebody else clean after them.
Taken very seriously
> Thanks.
-- 
Cheers!

Amanda  Shafack
Previous: Junio C HamanoNext: Amanda Shafack
Message 11 of 14 in “t9832,t2200: avoid using pipes in git related commands”
  1. 0/2 [Outreachy][Patch v1] t9832,t2200: avoid using pipes in git related commandsAmanda Shafack via GitGitGadget, Oct 17, 2020
  2. 2/2 t2200: modify code syntaxAmanda Shafack via GitGitGadget, Oct 17, 2020
  3. Eric SunshineOct 18, 2020
  4. Amanda ShafackOct 18, 2020
  5. 1/2 t9832,t2200: avoid using pipes in git commandsAmanda Shafack via GitGitGadget, Oct 17, 2020
  6. Eric SunshineOct 18, 2020
  7. Amanda ShafackOct 18, 2020
  8. t9832,t2200: avoid using pipes in git commandsAmanda Shafack via GitGitGadget, Oct 18, 2020
  9. Eric SunshineOct 18, 2020
  10. Junio C HamanoOct 18, 2020
  11. Amanda ShafackOct 18, 2020
  12. Amanda ShafackOct 18, 2020
  13. t2200,t9832: avoid using 'git' upstream in a pipeAmanda Shafack via GitGitGadget, Oct 18, 2020
  14. Junio C HamanoOct 18, 2020

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.