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

Re: [PATCH] t7422: remove extraneous argument to printf

From
Eric Sunshine <sunshine@sunshineco.com>
Date
Apr 9, 2025, 17:00 UTC
Message-ID
<CAPig+cRe9BQw=U41uOprZ5JRNgNTC46zMpyGjNy9b=y-hA8-tA@mail.gmail.com>
In-Reply-To
<CAPHxB8un1w-NBnfLne9d=vv9Sqa69eGoLhjOM0GcmhgkYKt-PA@mail.gmail.com>
On Wed, Apr 9, 2025 at 12:29 PM Subhaditya Nath <sn03.general@gmail.com> wrote:
Show 14 quoted lines
> On Thu, Apr 3, 2025 at 10:35 PM Eric Sunshine <sunshine@sunshineco.com> wrote:
> > [...] for the sake of consistency and to match the author's original
> > intent, it may make more sense to retain the argument to printf and
> > instead employ `%d`.
>
> The problem is, there are multiple ways the printf statement could be
> written -
>
> 1) printf "[submodule \"sm-$i\"]\npath = recursive-submodule-path-$i\n"
> 2) printf "[submodule \"sm-$i\"]\npath = recursive-submodule-path-%d\n" "$i"
> 3) printf "[submodule \"sm-%d\"]\npath = recursive-submodule-path-$i\n" "$i"
> 4) printf "[submodule \"sm-%d\"]\npath = recursive-submodule-path-%d\n" "$i" "$i"
>
> Which one of these is to be used?
 The final (#4) seems most natural.
Previous: Subhaditya NathNext: Junio C Hamano
Message 6 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.