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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, May 8, 2015 at 1:49 PM, Junio C Hamano <gitster@xxxxxxxxx> wrote:
> Danny Lin <danny0838@xxxxxxxxx> 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@xxxxxxxxx>
>> ---
>
> 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.
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]