Thread (27 messages) 27 messages, 6 authors, 2022-02-24

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

From: Shubham Mishra <hidden>
Date: 2022-02-23 18:01:57

Ah, It's dumb, I'm sorry. This was unintended. The regex I used gave
me all Git on LHS of pipe including this.
I understand it's not a Git command so we don't need to fix this. I
would say We shouldn't merge it.
I will take care to have a final eye on my patch before sending.
Sorry Again.

Thanks,
Shubham

On Wed, Feb 23, 2022 at 11:23 PM Taylor Blau [off-list ref] wrote:
On Wed, Feb 23, 2022 at 05:23:46PM +0530, Shubham Mishra wrote:
quoted
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.
This patch does preserve the existing behavior. But I'm hesitant to
recommend that we apply this patch, since our test suite assumes that
commands like find will work, and so we aren't concerned about squashing
any potential error codes when it's on the left-hand side of the pipe,
since we assume that it won't fail in general.

(That's notably different from the second patch in this series, where
the thing on the left-hand side of the pipe is a git invocation. In that
case, we really _do_ want to avoid having it on the left-hand side of
the pipe, because we don't have the same error-free expectation there,
and want to know when it fails).

I think that Ævar gave a nice summary of the above in [1]

Thanks,
Taylor

[1]: https://lore.kernel.org/git/220222.86pmnf6ket.gmgdl@evledraar.gmail.com/ (local)
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help