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

Re: [PATCH] t7407: use test_grep

From
Patrick Steinhardt <ps@pks.im>
Date
Jan 7, 2025, 09:57 UTC
Message-ID
<Z3z6dKBRjQlsrwjZ@pks.im>
In-Reply-To
<20250107071824.GA594237@coredump.intra.peff.net>
On Tue, Jan 07, 2025 at 02:18:24AM -0500, Jeff King wrote:
Show 17 quoted lines
> There are a few grep calls here that can benefit from test_grep, which
> produces more user-friendly output when it fails.
> 
> One of these calls also passes "-sq", which is curious. The "-q" option
> suppresses the matched output. But test output is either already
> redirected to /dev/null in non-verbose mode, and in verbose mode it's
> better to see the output. The "-s" option suppresses errors opening
> files, but we are just grepping in the "expected" file we just
> generated, so it should not be needed. Neither of these was really
> hurting anything, but they are not a style we'd like to see emulated. So
> get rid of them.
> 
> (It is also curious to grep in the expected file in the first place, but
> that is because we are auto-generating the expectation from a Git
> command. So this is double-checking it did what we wanted).
> 
> Signed-off-by: Jeff King <peff@peff.net>
Thanks, both of these look obviously good to me.
Patrick
Previous: Jeff KingNext: Kristoffer Haugsbakk
Message 2 of 6 in “t7407: use test_grep”
  1. t7407: use test_grepJeff King, Jan 7, 2025
  2. Patrick SteinhardtJan 7, 2025
  3. Kristoffer HaugsbakkJan 7, 2025
  4. Junio C HamanoJan 7, 2025
  5. Kristoffer HaugsbakkJan 7, 2025
  6. D. Ben KnobleJan 7, 2025

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.