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

Re: [PATCH] contrib/subtree: portability fix for string printing

From
Eric Sunshine <sunshine@sunshineco.com>
Date
May 8, 2015, 17:56 UTC
Message-ID
<CAPig+cQQSrQiSzp7Jat8LYH+RqYdpJ2XCXweAtrYE_QoLzSznQ@mail.gmail.com>
In-Reply-To
<xmqqy4kzklhp.fsf@gitster.dls.corp.google.com>
On Fri, May 8, 2015 at 1:49 PM, Junio C Hamano <gitster@pobox.com> wrote:
Show 17 quoted lines
> Danny Lin <danny0838@gmail.com> writes:
>
>> Replace echo using printf in debug() and say() for
>> better portability.
>>
>> Also re-wrap previous 'say -n "$str<CR>"' using a new
>> function progress() to prevent CR chars included in the
>> source code, which could be mal-processed in some shells.
>> For example, MsysGit trims CR before executing a shell
>> script file in order to make it work right on Windows
>> even if it uses CRLF as linefeeds.
>>
>> Signed-off-by: Danny Lin <danny0838@gmail.com>
>> ---
>
> Thanks, this looks good.  Will apply with a little bit of tweak in
> the log message.

Hmm, I would say that the changes to debug() and say() should either be dropped or moved to a separate patch (along with the first paragraph of the commit message). With the introduction of the progress() abstraction, there is no longer any need for changes to say(), and the "better portability" rationale for changing say() and debug() is never properly explained, and is thus nebulous at best.

Previous: Junio C HamanoNext: Junio C Hamano
Message 8 of 10 in “Re: [PATCH] contrib/subtree: fix linefeeds trimming for cmd_split()”
  1. Danny LinMay 7, 2015
  2. Danny LinMay 7, 2015
  3. Danny LinMay 7, 2015
  4. Junio C HamanoMay 7, 2015
  5. contrib/subtree: portability fix for string printingDanny Lin, May 8, 2015
  6. contrib/subtree: portability fix for string printingDanny Lin, May 8, 2015
  7. Junio C HamanoMay 8, 2015
  8. Eric SunshineMay 8, 2015
  9. Junio C HamanoMay 8, 2015
  10. Eric SunshineMay 8, 2015

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.