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

[PATCH 0/2] [Outreachy][Patch v1] t9832,t2200: avoid using pipes in git related commands

From
Amanda Shafack via GitGitGadget <gitgitgadget@gmail.com>
Date
Oct 17, 2020, 16:02 UTC
Message-ID
<pull.885.git.git.1602950552.gitgitgadget@gmail.com>

When the upstream of a pipe throws an error, the downstream still executes normally. This happens because the exit code of the upstream in a pipe is ignored. This behavior can make debugging very hard in case a test fails. Also, pipes are prone to deadlocks. If the upstream gets full, the commands downstream will never start.

Write out the output of the git command to a file, so as to test the exit codes of both commands.

Commit c6f44e1da5 (t9813: avoid using pipes, 2017-01-04) noticed that the exit code of upstream in the pipe is ignored, thus using pipes should be avoided.

Signed-off-by: Amanda Shafack shafack.likhene@gmail.com
[shafack.likhene@gmail.com]
Amanda  Shafack (1):
  t2200: modify code syntax
Amanda Shafack (1):
  t9832,t2200: avoid using pipes in git commands
 t/t2200-add-update.sh | 3 ++-
 t/t9832-unshelve.sh   | 3 ++-
 2 files changed, 4 insertions(+), 2 deletions(-)
base-commit: a5fa49ff0a8f3252c6bff49f92b85e7683868f8a
Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-git-885%2Flkmandy%2Favoid-pipes-v1
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-git-885/lkmandy/avoid-pipes-v1
Pull-Request: https://github.com/git/git/pull/885
-- 
gitgitgadget
Next: Amanda Shafack via GitGitGadget
Message 1 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.