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

[PATCH] t7422: fix extra printf argument, eliminate loops

From
SNSubhaditya Nath <sn03.general@gmail.com>
Date
Apr 9, 2025, 19:11 UTC
Message-ID
<20250409191139.29644-1-sn03.general@gmail.com>
In-Reply-To
<xmqqr021qkeh.fsf@gitster.g>
On Wed Apr 9, 2025 at 11:36 PM IST, Junio C Hamano wrote:
Show 8 quoted lines
> The other one in the example in this thread could lose the for loop
> by doing
>
>    printf "160000 commit $COMMIT\trecursive-submodule-path-%d\n" \
>          $(test_seq 2000)
>
> but for uniformity with other parts that cannot lose "for" loop, I
> would not recommend going in that direction.
Interesting. I didn't know printf could be used like so.

The patch I sent earlier can also be re-written to lose the loop by simply passing the output of test_seq via 'sed p' to print each number twice!

Previous: Junio C HamanoNext: Subhaditya Nath
Message 8 of 10 in “t7422: remove extraneous argument to printf”
  1. t7422: remove extraneous argument to printfSubhaditya Nath, Apr 3, 2025
  2. Eric SunshineApr 3, 2025
  3. Junio C HamanoApr 9, 2025
  4. Subhaditya NathApr 9, 2025
  5. Subhaditya NathApr 9, 2025
  6. Eric SunshineApr 9, 2025
  7. Junio C HamanoApr 9, 2025
  8. t7422: fix extra printf argument, eliminate loopsSubhaditya Nath, Apr 9, 2025
  9. t7422: fix extra printf argument, eliminate loopsSubhaditya Nath, Apr 9, 2025
  10. Junio C HamanoApr 10, 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.