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

Re: [PATCH v2 1/2] t0001: avoid pipes with Git on LHS

From
Shubham Mishra <shivam828787@gmail.com>
Date
Feb 24, 2022, 05:14 UTC
Message-ID
<CAC316V7QDgZL0jOzgE-Ae86Phmf4XpeQdbKfNS3uA8uL_0uzKw@mail.gmail.com>
In-Reply-To
<xmqqo82xthjy.fsf@gitster.g>
HI Junio,
 I acknowledge, this patch is here by mistake, we don't need to merge it.

Thanks, Shubham

On Thu, Feb 24, 2022 at 2:40 AM Junio C Hamano <gitster@pobox.com> wrote:
Show 32 quoted lines
>
> Shubham Mishra <shivam828787@gmail.com> writes:
>
> > Pipes ignore error codes of LHS command and thu`s we should not use
> > them with Git in tests. As an alternative, use a 'tmp' file to write
> > the Git output so we can test the exit code.
>
> I do not know what thu`s is, but the above describes a sensible
> criterion to decide which pipe to touch and which pipe to leave
> alone.
>
> > -             find .git/worktrees -print | sort >expected &&
> > +             find .git/worktrees -print >tmp &&
> > +             sort tmp >expected &&
>
> And this change or ...
>
> >               git -C ../linked-worktree init &&
> >               test_cmp expected-exclude .git/info/exclude &&
> >               test_cmp expected-config .git/config &&
> > -             find .git/worktrees -print | sort >actual &&
> > +             find .git/worktrees -print >tmp &&
> > +             sort tmp >actual &&
>
> ... this change squarely contradict the reasoning written in the
> proposed log message.  These pipelines place "find" on the upstream
> of their pipe, and "find" is not something we are worried about
> introducing new bug into.
>
> >               test_cmp expected actual
> >       )
> >  '
Previous: Junio C HamanoNext: Shubham Mishra
Message 19 of 31 in “microproject: avoid using pipes in test”
  1. 0/2 microproject: avoid using pipes in testShubham Mishra, Feb 22, 2022
  2. 1/2 t0001: remove pipesShubham Mishra, Feb 22, 2022
  3. Derrick StoleeFeb 22, 2022
  4. Shubham MishraFeb 22, 2022
  5. Christian CouderFeb 22, 2022
  6. Junio C HamanoFeb 23, 2022
  7. Christian CouderFeb 24, 2022
  8. 2/2 t0003: remove pipesShubham Mishra, Feb 22, 2022
  9. Derrick StoleeFeb 22, 2022
  10. Ævar Arnfjörð BjarmasonFeb 22, 2022
  11. Shubham MishraFeb 22, 2022
  12. Taylor BlauFeb 22, 2022
  13. 0/2 avoid pipes with Git on LHSShubham Mishra, Feb 23, 2022
  14. 1/2 t0001: avoid pipes with Git on LHSShubham Mishra, Feb 23, 2022
  15. Taylor BlauFeb 23, 2022
  16. Shubham MishraFeb 23, 2022
  17. Taylor BlauFeb 23, 2022
  18. Junio C HamanoFeb 23, 2022
  19. Shubham MishraFeb 24, 2022
  20. 2/2 t0003: avoid pipes with Git on LHSShubham Mishra, Feb 23, 2022
  21. Taylor BlauFeb 23, 2022
  22. Shubham MishraFeb 23, 2022
  23. Shubham MishraFeb 23, 2022
  24. Shaoxuan YuanFeb 23, 2022
  25. Taylor BlauFeb 23, 2022
  26. Shubham MishraFeb 23, 2022
  27. Christian CouderFeb 24, 2022
  28. Shubham MishraFeb 24, 2022
  29. Christian CouderFeb 24, 2022
  30. Shubham MishraFeb 24, 2022
  31. Christian CouderFeb 24, 2022

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.