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

Re: Fwd: [PATCH] git-subtree: Avoid using echo -n even indirectly

From
Matthieu Moy <matthieu.moy@grenoble-inp.fr>
Date
Oct 9, 2013, 11:26 UTC
Message-ID
<vpqy562y9b8.fsf@anie.imag.fr>
In-Reply-To
<CAAcnjCQ+c=8wYZkqS7VzZ_bDDDkSwdQ3qdz77osrSpKDS9ON7Q@mail.gmail.com>
Paolo Giarrusso <p.giarrusso@gmail.com> writes:
> Otherwise, one could
> change say to use printf, but that's more invasive.

"invasive" in the sense that it impacts indirectly more callers, but are there really cases where "echo" is needed when calling "say"? Aren't there other potential bugs when arbitrary strings are passed to "say", that would be fixed by using printf once and for all?

The patch would look like the one I did in 89b0230a20 (Wed Aug 7 2013, die_with_status: use "printf '%s\n'", not "echo").

-- 
Matthieu Moy
http://www-verimag.imag.fr/~moy/
Previous: Johannes SixtNext: Paolo Giarrusso
Message 5 of 9 in “git-subtree: Avoid using echo -n even indirectly”
  1. git-subtree: Avoid using echo -n even indirectlyPaolo G. Giarrusso, Oct 9, 2013
  2. Tay Ray ChuanOct 9, 2013
  3. Fwd: [PATCH] git-subtree: Avoid using echo -n even indirectlyPaolo Giarrusso, Oct 9, 2013
  4. Johannes SixtOct 9, 2013
  5. Matthieu MoyOct 9, 2013
  6. Paolo GiarrussoOct 9, 2013
  7. Jeff KingOct 9, 2013
  8. Jonathan NiederOct 9, 2013
  9. Paolo GiarrussoOct 11, 2013

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.